The seaborn Package
Seaborn is a library for making statistical graphics in Python. It is built on top of matplotlib and closely integrated with pandas data structures. — Seaborn website
Reference
What's the difference between seaborn
and matplotlib
?
seaborn
and matplotlib
?Seaborn is designed to be more user-friendly and to work better with pandas
dataframes. For more information on dataframes and the pandas
package see here. It is also easier to customize plot colors, formats, etc. with Seaborn. Because seaborn is built on top of matplotlib, you will have to use commands from both packages for many operations.
Before diving into seaborn, make sure you brush up on your matplotlib skills! Click here for more information on matplotlib.
Installation
First install the package using Pip, if necessary:
Usage
Constructing a Scatterplot:
NOTE: once you "show" the chart, you'll see the chart open in native window on your computer. You'll be able to view your chart, but when you're done you'll need to close the chart window in order to regain the ability to type commands in your terminal window.
Consult the documentation and examples for a variety of chart customization options.
Last updated