Data visualization is an important step in data processing. It helps us more vividly observe data. Matplotlib is an important plotting library in Python mostly used for two-dimensional plotting. Matplotlib has convenient plotting modules, able to plot high-quality and diversified plots. The manifesto of Matplotlib is simple and common tasks should be simple to perform provide options for more complex tasks. You'll find that it is really true after learning it. In Matplotlib, we mainly use the two modules of "pyplot" and "pylab"(The pylab module is now deprecated), for convenient and quick plotting. Of the two, the module "pyplot" provides a set of plotting API similar to MATLAB. Many such complex structures containing a lot of plotting objects are hidden in this API. In actual use, you only need to call some functions in it for plotting. As for the other module "pylab", it is for more conveniently and quickly plotting various plots. It contains some common functions in NumPy and pyplot. Its use is actually quite similar to that of pyplot. The main contents for this section are to first look at how Matplotlib uses corresponding modules, of which we will focus on this module of pyplot to plot some basic plots. Previously, when we introduced Matplotlib, we also visited its official website. The page of "gallery", for example, contains many thumbnails, as well as corresponding source programs. You might have a look, too. Here, we use the monthly means of closing prices of the Coca-Cola Company's stock, over the recent year as the data source and see how to, in Matplotlib, use "pyplot" and "pylab" modules to plot basic plots. The data here are put into this variable. It is a Series. First, we plot such data into a line chart. The line chart can be regarded as a very basic graph. Let's look at its code. We first need to import this module. As a common practice, we abbreviate it into "plt". The work mode of pyplot is similar to MATLAB. It uses some functions in the style of command line to make various changes to plots, like, to create a plot, create an area of plot or draw a line. Here, as we see, in this module, the most fundamental plotting function is "plot()". The "plot()" function has two basic arguments, x and y, representing the data of the x axis and the y axis, respectively. Here, we use the previous two datasets of monthly mean prices. One is "index()", i.e. the month, and the other, i.e. the monthly mean prices, to plot basic plots. As we see, that's the result of plotting. The x axis means the month, and the y axis is the mean prices. OK, let's demonstrate it. Well. Let's execute this program. At first, we scrape data online, and plot the plot. The result is such a plot, by default, a line chart. As we see, we can save this plot, save, or directly copy this plot. Besides, we many directly save this plot in the program. As the default storage format is png, we may directly write down the jpg format. This is the plot we just used the "savefig()" function to write into the default path, which is the same as what we saw at the console window. Look at another example. We use the "arange()" function in NumPy to generate a set of data,, and plot a line chart for those data and some expressions compose of them with the "plot()" function. We've found that, the "plot()" function supports not only one dataset, but also many datasets. The plotted result is like this. Three curves are in the same plot. Apart from line charts, we may also plot some other plots. Here, say, we see a lot of dots. What are they? It's known as a scatter plot. How can we draw a scatter plot? Quite easy. Let's see, we only need to add an argument 'o' in "plot()". What if we want to plot bar charts? Just use the "bar()" function, instead of "plot()" Apart from the above-mentioned plot forms, there are many other plot forms, like histograms and pie charts. In actual use, we should select appropriate forms of plot based on the type of data. For example, line charts are suitable for expressing, a dataset with the regularity of continuous changes. Well, for comparing several different objects at the same graduation, bar charts are more suitable. And pie charts are suitable for expressing proportions. In next section, we'll further introduce different types of plots to you. Have a try. To generate a scatter plot, is this successful? To generate a bar chart, we just need to use the "bar()" function. Just now, we saw how to plot with the pyplot module. Now, let's look at how to the mode of plotting with the pylab module. It's similar to pyplot. Similarly, import the module. The conventional name of pylab is pl, with the "plot()" function as well. Pylab mainly contains some common functions in pyplot and NumPy. It is also convenient for plotting, very fast. We may also use them.