Axis Labels and Titles
Always label your charts
Without labels, your chart is incomplete.
Labels
import matplotlib.pyplot as plt
x = [1, 2, 3, 4]
y = [100, 120, 90, 150]
plt.figure(figsize=(7, 4))
plt.plot(x, y, marker="o")
plt.title("Daily orders")
plt.xlabel("Day")
plt.ylabel("Orders")
plt.tight_layout()
plt.show()Labels
import matplotlib.pyplot as plt
x = [1, 2, 3, 4]
y = [100, 120, 90, 150]
plt.figure(figsize=(7, 4))
plt.plot(x, y, marker="o")
plt.title("Daily orders")
plt.xlabel("Day")
plt.ylabel("Orders")
plt.tight_layout()
plt.show()Include units
Examples:
- Revenue (₹)
- Duration (seconds)
- Conversion rate (%)
Tip
A good title explains the question, not just the chart type.
Bad: “Line chart”
Better: “Daily orders increased after campaign launch”
If this helped you, consider buying me a coffee ☕
Buy me a coffeeWas this page helpful?
Let us know how we did
