In this article we are going to see about seaborn an amazing graph plotting library .We will also see some basic examples of graph plotting using this library.
What is seaborn?
Here is some of the functionality that seaborn offers:
- A dataset-oriented API for examining relationships between multiple variables
- Specialized support for using categorical variables to show observations or aggregate statistics
- Options for visualizing univariate or bivariate distributions and for comparing them between subsets of data
- Automatic estimation and plotting of linear regression models for different kinds dependent variables
- Convenient views onto the overall structure of complex datasets
- High-level abstractions for structuring multi-plot grids that let you easily build complex visualizations
- Concise control over matplotlib figure styling with several built-in themes
- Tools for choosing color palettes that faithfully reveal patterns in your data
seaborn can be easily installed using pip as,
pip install seaborn
import seaborn as snsfrom matplotlib import pyplot as pltfmri=sns.load_dataset('fmri')fmri.head()
Now, similarly, let’s go ahead and create a bar-plot:
Now, let’s go ahead and create a scatter-plot on top of the iris dataset:
iris = pd.read_csv('iris.csv')iris.head()
Hope this article gave you some basic idea about the seaborn library. For additional methods and complex tutorial refer their official documentation here.