SlideShare a Scribd company logo
Tips and Tricks
for Data Visualization
in Python
#seaborn
by
Jacqueline Carvalho
Seaborn is a library for making attractive and
informative statistical graphics in Python. It is
built on top of matplotlib and integrated with the
PyData stack, including support for numpy and
pandas data structures and statistical routines.
FacetGrid
Matplotlib is a Python 2D plotting library
which produces publication quality figures in
a variety of hardcopy formats and interactive
environments across platforms. Matplotlib
can be used in Python scripts, the Python
and IPython shells, the Jupyter notebook,
web application servers, and four graphical
user interface toolkits.
matplotlib.pyplot is a collection of command
style functions that make matplotlib work like
MATLAB. Each pyplot function makes some
change to a figure: e.g., creates a figure,
creates a plotting area in a figure, plots some
lines in a plotting area, decorates the plot with
labels, etc.
The FacetGrid is an object that links
a Pandas DataFrame to a matplotlib
figure with a particular structure.
In particular, FacetGrid is used to
draw plots with multiple Axes where
each Axes shows the same
relationship conditioned on different
levels of some variable. It’s possible
to condition on up to three variables
by assigning variables to the rows
and columns of the grid and using
different colors for the plot elements.
hue allows to choose which logic of
colors the grid will follow. For
example: if you choose ‘genre’, it
means that all the data related to that
genre will have the same color; if you
choose ‘year’, it means that all the
data related to the same year will
have the same color.
FacetGrid
Kdeplot
Kdeplot fits and plots a
univariate or bivariate kernel
density estimate.
If True, shade in the area
under the KDE curve, or
draw with filled contours
when data is bivariate.
The determination whether to issue a warning message is controlled by the warning filter,
which is a sequence of matching rules and actions. Rules can be added to the filter by
calling filterwarnings() and reset to its default state by calling resetwarnings().
The colormap or cmap is
used to map normalized
data values to RGBA (red,
green, blue, alpha) colors.
Kdeplot
Kdeplot
cbar. If True and drawing a
bivariate KDE plot, add a
colorbar.
If True, shade the lowest contour of a bivariate KDE plot. Not relevant when drawing a
univariate plot or when shade=False. Setting this to False can be useful when you want
multiple densities on the same Axes.
Subplots. This utility wrapper
makes it convenient to create
common layouts of subplots,
including the enclosing figure
object, in a single call.
Kdeplot
Jointplot
Jointplot function provides a
convenient interface to the
JointGrid class, with several
canned plot kinds. This is
intended to be a fairly lightweight
wrapper; if you need more
flexibility, you should use
JointGrid directly.
Kind defines which plot to
draw. It may be:
Scatter,
Reg,
Resid,
Kde or
hex.
xlim and ylim define the axis
limits before plotting.
Set aesthetic parameters in one step
to the background of the chart. The
style may be darkgrid, whitegrid, dark,
white or ticks
Jointplot
Heatmap
Clustermap plots a matrix
dataset as a hierarchically-
clustered heatmap..
Standard_scale. Either 0 (rows)
or 1 (columns). Whether or not to
standardize that dimension,
meaning for each row or column,
subtract the minimum and divide
each by its maximum.
cyl.unique sets standard colors
to the left bar chart
Heatmap
Source
https://seaborn.pydata.org/
https://matplotlib.org/
https://www.superdatascience.com/python/
https://python-graph-gallery.com/
Data
https://github.com/DSJacq/Visualization
July 2018

More Related Content

PDF
Using TensorFlow for Machine Learning
PDF
Object Detection & Machine Learning Paper
PPT
Graph Matching
PDF
Large data with Scikit-learn - Boston Data Mining Meetup - Alex Perrier
RTF
CurvFit
PPTX
Data visualization using R
PPTX
Compiler Design
PDF
Kim Hammar - Distributed Deep Learning - RISE Learning Machines Meetup
Using TensorFlow for Machine Learning
Object Detection & Machine Learning Paper
Graph Matching
Large data with Scikit-learn - Boston Data Mining Meetup - Alex Perrier
CurvFit
Data visualization using R
Compiler Design
Kim Hammar - Distributed Deep Learning - RISE Learning Machines Meetup

What's hot (19)

PDF
One Algorithm to Rule Them All: How to Automate Statistical Computation
PDF
Broom: Converting Statistical Models to Tidy Data Frames
PDF
I Don't Want to Be a Dummy! Encoding Predictors for Trees
PDF
Parallel External Memory Algorithms Applied to Generalized Linear Models
PDF
Intro to ggplot2 - Sheffield R Users Group, Feb 2015
PDF
MapReduce for scientific simulation analysis
PDF
R Packages for Time-Varying Networks and Extremal Dependence
PDF
MapReduce Algorithm Design
PDF
Elegant Graphics for Data Analysis with ggplot2
PPT
Secrets of Supercomputing
PDF
Datomic rtree-pres
PDF
Realtime 3D Visualization without GPU
PDF
PDF
Python Científico
PDF
Relational Algebra and MapReduce
PDF
GeoPython - Mapping Data in Jupyter Notebooks with PixieDust
PPTX
Data Applied: Clustering
PPTX
PPTX
Python Pyplot Class XII
One Algorithm to Rule Them All: How to Automate Statistical Computation
Broom: Converting Statistical Models to Tidy Data Frames
I Don't Want to Be a Dummy! Encoding Predictors for Trees
Parallel External Memory Algorithms Applied to Generalized Linear Models
Intro to ggplot2 - Sheffield R Users Group, Feb 2015
MapReduce for scientific simulation analysis
R Packages for Time-Varying Networks and Extremal Dependence
MapReduce Algorithm Design
Elegant Graphics for Data Analysis with ggplot2
Secrets of Supercomputing
Datomic rtree-pres
Realtime 3D Visualization without GPU
Python Científico
Relational Algebra and MapReduce
GeoPython - Mapping Data in Jupyter Notebooks with PixieDust
Data Applied: Clustering
Python Pyplot Class XII
Ad

Similar to Tips and Tricks for Data Visualization in Python (20)

PPTX
Matplotlib yayyyyyyyyyyyyyin Python.pptx
PPTX
python data science libray seaborn.pptx
PPTX
python libray for data analytics seaborn[1].pptx
PDF
UNIT-2.data exploration and visualization
PPTX
a9bf73_Introduction to Matplotlib01.pptx
PPTX
Python_for_Data_Visualization.pptx python for BE &Mtech
PPTX
Seaborn for data visualization using python.pptx
PDF
Python seaborn cheat_sheet
PDF
Introduction to Data Visualization,Matplotlib.pdf
PPTX
Data Visualization using different python libraries.pptx
PPTX
Matplot Lib Practicals artificial intelligence.pptx
PPTX
Data Visualization using different Python libraries .pptx
PPTX
Unit3-v1-Plotting and Visualization.pptx
PDF
Introduction to plotting in Python
PPTX
Matplotlib.pptx for data analysis and visualization
PPTX
Introduction to matplotlib
PPTX
UNIT-5-II IT-DATA VISUALIZATION TECHNIQUES
PPTX
data analytics and visualization CO4_18_Data Types for Plotting.pptx
DOCX
Data visualization using py plot part i
PPTX
Matplotlib_Presentation jk jdjklskncncsjkk
Matplotlib yayyyyyyyyyyyyyin Python.pptx
python data science libray seaborn.pptx
python libray for data analytics seaborn[1].pptx
UNIT-2.data exploration and visualization
a9bf73_Introduction to Matplotlib01.pptx
Python_for_Data_Visualization.pptx python for BE &Mtech
Seaborn for data visualization using python.pptx
Python seaborn cheat_sheet
Introduction to Data Visualization,Matplotlib.pdf
Data Visualization using different python libraries.pptx
Matplot Lib Practicals artificial intelligence.pptx
Data Visualization using different Python libraries .pptx
Unit3-v1-Plotting and Visualization.pptx
Introduction to plotting in Python
Matplotlib.pptx for data analysis and visualization
Introduction to matplotlib
UNIT-5-II IT-DATA VISUALIZATION TECHNIQUES
data analytics and visualization CO4_18_Data Types for Plotting.pptx
Data visualization using py plot part i
Matplotlib_Presentation jk jdjklskncncsjkk
Ad

Recently uploaded (20)

PDF
Fluorescence-microscope_Botany_detailed content
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PDF
Mega Projects Data Mega Projects Data
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
Business Acumen Training GuidePresentation.pptx
PDF
Clinical guidelines as a resource for EBP(1).pdf
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PDF
Foundation of Data Science unit number two notes
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPT
Quality review (1)_presentation of this 21
PPTX
Database Infoormation System (DBIS).pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Fluorescence-microscope_Botany_detailed content
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Mega Projects Data Mega Projects Data
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Supervised vs unsupervised machine learning algorithms
Business Acumen Training GuidePresentation.pptx
Clinical guidelines as a resource for EBP(1).pdf
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Business Ppt On Nestle.pptx huunnnhhgfvu
Foundation of Data Science unit number two notes
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Quality review (1)_presentation of this 21
Database Infoormation System (DBIS).pptx
.pdf is not working space design for the following data for the following dat...
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
168300704-gasification-ppt.pdfhghhhsjsjhsuxush

Tips and Tricks for Data Visualization in Python

  • 1. Tips and Tricks for Data Visualization in Python #seaborn by Jacqueline Carvalho
  • 2. Seaborn is a library for making attractive and informative statistical graphics in Python. It is built on top of matplotlib and integrated with the PyData stack, including support for numpy and pandas data structures and statistical routines.
  • 3. FacetGrid Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter notebook, web application servers, and four graphical user interface toolkits. matplotlib.pyplot is a collection of command style functions that make matplotlib work like MATLAB. Each pyplot function makes some change to a figure: e.g., creates a figure, creates a plotting area in a figure, plots some lines in a plotting area, decorates the plot with labels, etc. The FacetGrid is an object that links a Pandas DataFrame to a matplotlib figure with a particular structure. In particular, FacetGrid is used to draw plots with multiple Axes where each Axes shows the same relationship conditioned on different levels of some variable. It’s possible to condition on up to three variables by assigning variables to the rows and columns of the grid and using different colors for the plot elements. hue allows to choose which logic of colors the grid will follow. For example: if you choose ‘genre’, it means that all the data related to that genre will have the same color; if you choose ‘year’, it means that all the data related to the same year will have the same color.
  • 5. Kdeplot Kdeplot fits and plots a univariate or bivariate kernel density estimate. If True, shade in the area under the KDE curve, or draw with filled contours when data is bivariate. The determination whether to issue a warning message is controlled by the warning filter, which is a sequence of matching rules and actions. Rules can be added to the filter by calling filterwarnings() and reset to its default state by calling resetwarnings(). The colormap or cmap is used to map normalized data values to RGBA (red, green, blue, alpha) colors.
  • 7. Kdeplot cbar. If True and drawing a bivariate KDE plot, add a colorbar. If True, shade the lowest contour of a bivariate KDE plot. Not relevant when drawing a univariate plot or when shade=False. Setting this to False can be useful when you want multiple densities on the same Axes. Subplots. This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call.
  • 9. Jointplot Jointplot function provides a convenient interface to the JointGrid class, with several canned plot kinds. This is intended to be a fairly lightweight wrapper; if you need more flexibility, you should use JointGrid directly. Kind defines which plot to draw. It may be: Scatter, Reg, Resid, Kde or hex. xlim and ylim define the axis limits before plotting. Set aesthetic parameters in one step to the background of the chart. The style may be darkgrid, whitegrid, dark, white or ticks
  • 11. Heatmap Clustermap plots a matrix dataset as a hierarchically- clustered heatmap.. Standard_scale. Either 0 (rows) or 1 (columns). Whether or not to standardize that dimension, meaning for each row or column, subtract the minimum and divide each by its maximum. cyl.unique sets standard colors to the left bar chart