Visualization with Matplotlib
Like many other things discussed in this book, there are many packages that can tackle any particular area. For the job of visualizing, Matplotlib is easily one of the most widely used. Not only is it quite easy to show simple graphs, but there are also many advanced options that you can use as well. It also works very well with panda DataFrames and has carved out its place as one of the most widely used packages in data science.
Let's start with a straightforward example of how to display a plot.
There are a few basic steps that you should take almost every time you want to show a plot:
- Preparing the data
- Plotting the data
- Customizing the plot
- Showing the plot
We'll walk through all of these, but we've already done much of step one in the Cleaning data with pandas section. Let's take that data and group it to focus on the categories of majors.
Preparing data for plotting
Let's take the existing...