Introduction to pyplot
Now, we will start using matplotlib
with the pyplot
interface. The topic that we will cover is the pyplot
interface and some examples
In our Jupyter Notebook, the first thing that we notice is that we have a command that includes matplotlib inline
with the %
sign as shown in the following code block:
%matplotlib inline
This is basically the way we tell the Jupyter Notebook that we want to see the plots in the notebook. When we don't use this command and execute this line, we see that the plot will appear in a different window.
Pyplot is basically a collection of command style functions that make matplotlib
work similar to MATLAB. The idea is that we have a collection of functions and each function makes some changes to a figure, and this figure is considered to be the current figure. So every function does something to a figure; for instance, we can create a figure, we can create a plotting area in a figure, we can plot a line in a subplot of the figure, and we can change...