ax.spines[["top","right"]].set_visible(False)
ax.grid(axis="y", alpha=0.3)
ax.set_xlabel("") # X axis label often redundant
ax.tick_params(left=False) # hide ticks
bars = ax.bar(months, revenue, color="#217346")
for bar, value in zip(bars, revenue):
ax.text(bar.get_x() + bar.get_width()/2,
bar.get_height() + 0.5,
f"${value:,.0f}",
ha="center", va="bottom", fontsize=9)
plt.tight_layout()
plt.savefig("revenue.png", dpi=200, bbox_inches="tight")
About 1 in 12 people has red-green colour blindness. When using colour as a meaningful signal, prefer a colour-blind-safe palette:
sns.set_palette("colorblind")
dpi=200 for slides / print.Take your monthly-revenue bar chart from the matplotlib lesson. Remove the spines. Add dollar-value labels on top of each bar. Save at 200 dpi.