Seaborn - Tutorialspoint
嚜燙eaborn
i
Seaborn
About the Tutorial
Seaborn is an open source, BSD -licensed Python library providing high level API for
visualizing the data using Python programming language.
Audience
This tutorial takes you through the basics and various functions of Seaborn. I t is
specifically useful for people working on data analysis. After com pleting this tutorial, you
will find yourself at a m oderate level of expertise from where you can take yourself to
higher levels of expertise.
Prerequisites
You should have a basic understanding of com puter program ming term inologies. A basic
understanding of Python and any of the program ming languages is a plus. Seaborn
library is built on top of Matplotlib. Having basic idea of Matplotlib will help you
understand this tutorial in a better way.
Copyright & Disclaimer
? C opyright 2017 by Tutorials Point (I ) Pvt. Ltd.
All the content and graphics published in this e -book are the property of Tutorials Point
(I ) Pvt. Ltd. The user of this e -book is prohibited to reuse, retain, copy, distribute or
republish any contents or a part of contents of this e -book in any m anner without written
consent of the publisher.
W e strive to update the contents of our website and tutorials as tim ely and as precisely
as possible, howe ver, the contents m ay contain inaccuracies or errors. Tutorials Point (I )
Pvt. Ltd. provides no guarantee regarding the accuracy, tim eliness or com pleteness of
our website or its contents including this tutorial. I f you discover any errors on our
website or in this tutorial, please notify us at contact@
ii
Seaborn
Table of Contents
About the Tutorial ........................................................................................................................................................... ii
Audience............................................................................................................................................................................ ii
Prerequisites ..................................................................................................................................................................... ii
Copyright & Disclaimer ................................................................................................................................................... ii
Table of Contents ............................................................................................................................................................ iii
1.
Seaborn 每 Introduction ...................................................................................................................................................6
Seaborn Vs Matplotlib .....................................................................................................................................................6
2.
Seaborn 每 Environment Setup.......................................................................................................................................8
Installing Seaborn and getting started ..........................................................................................................................8
3.
Seaborn 每 Importing Dat asets and Libraries ........................................................................................................... 10
Importing Libraries ........................................................................................................................................................ 10
Importing Datasets ........................................................................................................................................................ 10
4.
Seaborn 每 Figure Aesthetic ......................................................................................................................................... 13
Seaborn Figure Styles .................................................................................................................................................... 16
Removing Axes Spines................................................................................................................................................... 17
Overriding the Elements ............................................................................................................................................... 18
Scaling Plot Elements .................................................................................................................................................... 21
5.
Seaborn 每 Color Palette ............................................................................................................................................... 23
Building Color Palette.................................................................................................................................................... 23
Qualitative Color Palettes............................................................................................................................................. 24
Sequential Color Palettes ............................................................................................................................................. 25
Diverging Color Palette ................................................................................................................................................. 25
iii
Seaborn
Setting the Default Color Palette ................................................................................................................................ 26
Plotting Univariate Distribution .................................................................................................................................. 27
6.
Seaborn 每 Histogram .................................................................................................................................................... 29
7.
Seaborn 每 Kernel Density Estimates ......................................................................................................................... 31
Fitting Parametric Distribution .................................................................................................................................... 31
Plotting Bivariate Distribution ..................................................................................................................................... 32
Scatter Plot...................................................................................................................................................................... 33
Hexbin Plot...................................................................................................................................................................... 34
Kernel Density Estimation ............................................................................................................................................ 35
8.
Seaborn 每 Visualizing Pairwise Relationship........................................................................................................... 37
Axes .................................................................................................................................................................................. 37
9.
Seaborn 每 Plotting Categorical Data ............................................................................................................................1
Categorical Scatter Plots..................................................................................................................................................1
10. Seaborn 每 Distribution of Observations......................................................................................................................6
Box Plots .............................................................................................................................................................................6
Violin Plots..........................................................................................................................................................................7
11. Seaborn 每 Statistical Estim ation ................................................................................................................................ 12
Bar Plot ............................................................................................................................................................................ 12
Point Plots ....................................................................................................................................................................... 14
12. Seaborn 每 Plotting Wide Form Data.......................................................................................................................... 16
13. Seaborn 每 Multi Panel Categorical Plots .................................................................................................................. 20
Factorplot ........................................................................................................................................................................ 20
What is Facet Grid? ....................................................................................................................................................... 22
iv
Seaborn
14. Seaborn 每 Linear Relationships .................................................................................................................................. 28
Functions to Draw Linear Regression Models .......................................................................................................... 28
Fitting Different Kinds of Models ................................................................................................................................ 31
15. Seaborn 每 Facet Grid .................................................................................................................................................... 35
Plotting Small Multiples of Data Subsets................................................................................................................... 35
16. Seaborn 每 Pair Grid ....................................................................................................................................................... 40
v
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- mathematics in python
- let s try some random projections of the data
- matplotlib 2d and 3d plotting in python
- chapter plotting data using 4 matplotlib
- class xii informatics practices practical list
- networkx tutorial stanford university
- pandas dataframe notes university of idaho
- seaborn tutorialspoint
- how big is your your plot margins getting a square graph