matplotlib
- a plotting library for python and NumPy
- designed to resemble MATLAB (matric laboratory) style plotting
- multi platfor data visualization library
- Genrates graphs with just a few lines of code
- Integrated with Jupyter notebook/lab
Line Plot Example 1
screenshot line plot
Scatter Plot Example 1
screenshot
Scatter
screenshot
Bar Plot Example 1
screenshot
Histogram
screenshot
Pie Chart
screenshot
Matplotlib Installation
pip install matplotlib
pip3 install matplotlib
Matplotlib Example
import matplotlib.pyplot as plt
import numpy as np
x_arr = np.arange(0,20)
y_arr = np.sqrt(x_arr)
plt.title("Square Root")
plt.xlabel("x")
plt.ylabel("sqrt(x)")
plt.grid()
plt.plot(x_arr, y_arr)
plt.bar(x_arr, y_arr)
plt.show()