The best way to understand the usage of the
matplotlib module is through examples. The following example could be the simplest one since it has just three lines of Python code. The objective is to link several points. By default, the
matplotlib module assumes that the x axis starts at zero and moves by one on every element of the array. The following command lines illustrate this situation:
>>>from matplotlib.pyplot import * >>>plot([1,2,3,10]) >>>show()
After we press the Enter key after typing the last command of
show(), the following graph will appear:
At the bottom of the graph, we can find a set of icons, ...