import numpy
import matplotlib.pyplot as plt
Matplotlib
Matplotlib can be used for creating plots and charts. The library is generally used as follows: Call a plotting function with some data (e.g. .plot()). Call many functions to setup the properties of the plot (e.g. labels and colors). Make the plot visible (e.g. .show()).
Line Plot
= numpy.array([1,2,3]) myarray
plt.plot(myarray)'X axis')
plt.xlabel('Y axis')
plt.ylabel( plt.show()
Scatter Plot
= numpy.array([1,2,3])
x = numpy.array([2,4,6]) y
plt.scatter(x,y)'X axis')
plt.xlabel('Y axis')
plt.ylabel( plt.show()