matplotlib pyplot install code example
Example 1: python install matplotlib
pip install matplotlib
Example 2: install matplotlib pip
// install matplotlib
pip install matplotlib
// using conda
conda install -c conda-forge matplotlib
Example 3: pyplot python
import numpy as np
import matplotlib.pyplot as plt
x = np.array([1, 3, 4, 6])
y = np.array([2, 3, 5, 1])
plt.plot(x, y)
plt.show()
Example 4: matplotlib.pyplot
plt.plot([1, 2, 3, 4], [1, 4, 9, 16]) # plot x against y