HomeCourseModule 11 › Formatting for stakeholders

Formatting for stakeholders

Module 11 · Data Visualization7 min readBeginner

What you'll learn

  • Remove unnecessary chart-junk
  • Add data labels on top of bars
  • Save at print quality

Less is more

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

Labels on bars

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)

Save

plt.tight_layout()
plt.savefig("revenue.png", dpi=200, bbox_inches="tight")

Colours for accessibility

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")

Key takeaways

  • Drop the chart-junk — top/right spines, redundant labels.
  • Label totals on bars; don't make the reader squint.
  • Save at dpi=200 for slides / print.
  • Use colour-blind-safe palettes.

Polish a chart

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.

📹 Video walkthrough
A video walkthrough of this lesson will be embedded here. Until then, the written walkthrough above mirrors what the video will cover step-for-step.