

First off, we learned in school that we're supposed to put labels on each axis and that we need a title to our graph or chart.

Now, of course, there are some problems with our graph. So, with the code above, we just import pyplot from matplotlib, we use pyplot to "plot" some data to the canvas in memory, then we use plt, which is pyplot, to show what we've got. This is so the computer can first draw everything, and then perform the more laborious task of showing it on the screen. Once you've drawn that data, you can then "show" that data. First, you have some data, then you "draw" that data to a canvas of some sort, but it is only in the computer's memory. This process is true with a lot of computer graphics processes.

#Importing pyplotĪs you progress with Matplotlib, it might be useful to understand how it works fundamentally. Here's some basic code to generating one of the most simple graphs that we can, it will take us only 3 lines. Once you can successfully import matplotlib, then you are ready to continue. Most often, either the bit version does not match (64 bit vs 32 bit), or you are missing a package like dateutil or pyparsing. Make sure there are no errors on the import. Once you have Matplotlib installed, be sure to open up a terminal or a script, type: import matplotlib You can get all of these as well, if you are on a Windows machine by heading to: From there, it'd be wise to go ahead and make sure you have pyparsing, dateutil, six, numpy, and maybe some of the others mentioned in the video.

In order to get the Matplotlib, you should first head to and download the version that matches your version of Python. If you are interested in learning more about Matplotlib, then I highly suggest you visit my extensive and dedicated tutorial series on just Matplotlib. In this tutorial, I will be covering all of what I consider to be the basic necessities for Matplotlib. With Matplotlib, arguably the most popular graphing and data visualization module for Python, this is very simplistic to do. Either they are wanting to see it for themselves to get a better grasp of the data, or they want to display the data to convey their results to someone. Naturally, data scientists want a way to visualize their data. One of the most popular uses for Python is data analysis.
