Note
Click here to download the full example code
A most simple plot, where a list of numbers is plotted against their index.
=============
Pyplot Simple
=============
A most simple plot, where a list of numbers is plotted against their index.
"""
import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()
Traceback (most recent call last):
File "/build/matplotlib-tq5J6U/matplotlib-3.1.2/examples/pyplots/pyplot_simple.py", line 1
=============
^
SyntaxError: invalid syntax
The use of the following functions, methods, classes and modules is shown in this example:
import matplotlib
matplotlib.pyplot.plot
matplotlib.pyplot.ylabel
matplotlib.pyplot.show
Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery