LM Basic Functions

🎨 Why Customize Plots?

Adding titles, labels, and legends makes your plots easier to understand and more informative. It helps the audience quickly see what each axis represents and what the data shows.

🏷️ Adding Titles and Labels

Add a title

plt.title("My Awesome Plot")

Add axis labels

plt.xlabel("X-Axis Label")
plt.ylabel("Y-Axis Label")

🔖 Adding a Legend

If you have multiple data series in one plot, a legend helps distinguish them.

plt.plot(..., label="Series A")
plt.plot(...,label="Series B")
plt.legend()

💡 Grid and Style Adjustments

Add grid lines

plt.grid(True)

Change line style and color

plt.plot(x, y, color="green", linestyle="--", marker="o")

✅ Summary

  • Use titles and labels to explain your plot.
  • Add a legend when showing multiple series.
  • Adjust style and grid to improve readability.

This section helps you make your plots clear and professional, so they are ready to share or present!

Updated: