Matplotlib: Python Plotting Package
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. As of version 3.10.8, it continues to be actively maintained with regular updates and improvements.
Warnings
- breaking The default linewidth in `plot` has increased from 1 to 1.5 in version 3.10.8.
- breaking The dash patterns for line styles `'--'`, `':'`, and `'-.'` have changed in version 3.10.8.
- breaking The `errorbar` function no longer includes caps on error bars by default in version 3.10.8.
- breaking The `boxplot` function's default styling has changed in version 3.10.8, including color and marker updates.
Install
-
pip install matplotlib
Imports
- pyplot
import matplotlib.pyplot as plt
Quickstart
import matplotlib.pyplot as plt
# Create a simple line plot
plt.plot([1, 2, 3], [1, 4, 9])
plt.title('Simple Plot')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.show()