0% found this document useful (0 votes)
11 views2 pages

Seaborn

Uploaded by

youssef mahmoud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Seaborn

Uploaded by

youssef mahmoud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Seaborn

Seaborn is a powerful data visualization tool that allows you to create attractive and informative
visualizations with just a few lines of code. Let's return to this diagram of the data analysis workflow to
see where Seaborn fits in.

 Getting started: Import Seaborn (import seaborn as sns) and Matplotlib (import matplotlib.pyplot as
plt). Use plt.show() to display the visualization.

 Relational plots: These show relationships between two quantitative variables. Use relplot() with x
and y variables, DataFrame, and plot type (scatter or line).

 Categorical plots: These describe the distribution of a quantitative variable across categories. Use
catplot() with x, y (if applicable), DataFrame, and plot type (bar, count, box, point).

 Adding a third variable (hue): The "hue" parameter adds color-coded subgroups to a plot based on a
third variable.

 Adding a third variable (row/col): You can create subplots for each subgroup using the col and row
parameters in relplot() or catplot().

 Customization: Customize appearance using sns.set_style for background white", "dark", "whitegrid",
"darkgrid", "ticks,
sns.set_palette for color
sns.set_context for plot scale.

 Adding a title: Add titles and axis labels to FacetGrid or AxesSubplot objects.

 Final touches: Use set() to add x- and y-axis labels and plt.xticks(rotation=...) to rotate tick labels.

NOTE: Replot() an catplot() used bec its mote flexable and can esily create subplots using col , row
parameters

Bar plot display means of quantitative variables nit like count plot display count

Points show mean of quantitative variable

You might also like