<jupyter_start><jupyter_text>Distribution Plots<jupyter_code>import seaborn as sns
tips = sns.load_dataset('tips')
tips.head()
sns.distplot(tips['total_bill'], kde=False, bins=30)
sns.jointplot(x='total_bill', y='tip', data=tips, kind='hex') # kind='reg' stands for regression, and kind='kde'
sns.pairplot(tips, hue='sex') #palette='coolwarm'
sns.rugplot(tips['total_bill'])<jupyter_output><empty_output><jupyter_text>- Study KDE(Kernel Density Estimation), and NE(Normal Estimation) Categorical Plots<jupyter_code>import numpy as np
sns.barplot(x='sex', y='total_bill', data=tips, estimator=np.std)
sns.countplot(x='sex', data=tips)
sns.boxplot(x='day', y='total_bill', data=tips, hue='smoker')
sns.violinplot(x='day', y='total_bill', data=tips,hue='sex', split=True)
sns.stripplot(x='day', y='total_bill', data=tips, jitter=True, hue='sex', dodge=True)
sns.swarmplot(x='day', y='total_bill', data=tips)
sns.violinplot(x='day', y='total_bill', data=tips)
sns.swarmplot(x='day', y='total_bill', data=tips, color='black')
sns.factorplot(x='day', y='total_bill', data=tips, kind='violin') # you can use catplot also, it gives it the same operation<jupyter_output>C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\seaborn\categorical.py:3717: UserWarning: The `factorplot` function has been renamed to `catplot`. The original name will be removed in a future release. Please update your code. Note that the default `kind` in `factorplot` (`'point'`) has changed `'strip'` in `catplot`.
  warnings.warn(msg)<jupyter_text>Matrix Plots<jupyter_code>flights = sns.load_dataset('flights')
flights.head()
tc = tips.corr()
sns.heatmap(tc, annot=True)
fp = flights.pivot_table(index='month', columns='year', values='passengers')
sns.heatmap(fp) #, linecolor='white', linewidths=1)
sns.clustermap(fp, standard_scale=1)<jupyter_output><empty_output><jupyter_text>Grids<jupyter_code>iris = sns.load_dataset('iris')
iris.head()
sns.pairplot(iris)
import matplotlib.pyplot as plt
g = sns.PairGrid(iris)

g.map_diag(sns.distplot)
g.map_upper(plt.scatter)
g.map_lower(sns.kdeplot)
grid = sns.FacetGrid(data=tips, row='smoker', col='time')
grid.map(sns.distplot, 'total_bill')<jupyter_output>C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\seaborn\distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)
C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\seaborn\distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)
C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\seaborn\distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `di[...]<jupyter_text>Regression Plots<jupyter_code>tips.head()
sns.lmplot(x='total_bill', y='tip', data=tips, hue='sex', markers=['o', 'v'], scatter_kws={'s':20})
sns.lmplot(x='total_bill', y='tip', data=tips, col='day', hue='sex', aspect=0.6, height=8)<jupyter_output><empty_output><jupyter_text>Style and color<jupyter_code>sns.set_style('ticks') # whitegrid, dark, white
sns.countplot(x='sex',data=tips)
sns.despine()
plt.figure(figsize=(12, 6))
sns.countplot(x='sex',data=tips)
sns.set_context('poster', font_scale=1)
sns.countplot(x='sex',data=tips)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15783898305084745, 'fraction_numerical': 0.009798728813559322, 'mean_word_length': 8.057553956834532, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '370774', 'license': 'MIT', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1389, 'n_words': 279, 'path': 'Seaborn/Seaborn.ipynb', 'repo_name': 'Pythobit/Python-libraries', 'size': '3776'}