An introduction to matplotlib
The plotting capabilities in pandas
and seaborn
are powered by matplotlib
: both of these packages provide wrappers around the lower-level functionality in matplotlib
. Consequently, we have many visualization options at our fingertips with minimal code to write; however, this comes at a price: reduced flexibility in what we can create.
We may find that the pandas
or seaborn
implementation isn't quite meeting our needs, and, indeed, it may be impossible to override a particular setting after creating the plot with them, meaning we will have to do some of the legwork with matplotlib
. Additionally, many of the tweaks that will be made to the final appearance of the visualization will be handled with matplotlib
commands, which we will discuss in the next chapter. Therefore, it would greatly benefit us to have some understanding of how matplotlib
works.
The basics
The matplotlib
package is rather large since it encompasses quite a bit of functionality...