A chart without labels is a puzzle. Titles, axis labels and legends turn a picture into a message someone can read without you standing next to them explaining it.
The essential text
ax.set_title("Revenue by quarter", fontsize=14, fontweight="bold")ax.set_xlabel("Quarter")ax.set_ylabel("Revenue (₹ lakh)") # always include units!ax.legend(loc="upper left") # uses each series' label=
Legends
The legend maps colours/styles to meaning. It's built from the label= you passed to each plot call:
ax.plot(x, y1, label="2025")ax.plot(x, y2, label="2026")ax.legend(loc="best", frameon=False, ncol=2) # position, no box, 2 columns
Key takeaways
- 01set_title, set_xlabel, set_ylabel make a chart self-explanatory.
- 02Always include units in axis labels.
- 03ax.legend() builds a legend from each series' label=.
- 04A good title states the insight, not just the variables.
