First page Back Continue Last page Overview Graphics

Arguments of plot

plot can take an arbitrary number of arguments.

In the following example, the first argument is taken as the x value whereas the second argument is taken for the y values:

import matplotlib.pyplot as plt

plt.plot([1,2,3,4], [1,4,9,16])

plt.ylabel('squares')

plt.show()