Gráficos de puntos — muy corto, revizar#

  • 0:00 min | Última modificación: Octubre 12, 2021 | [YouTube]

[1]:
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
[2]:
penguins = sns.load_dataset("penguins")

display(
    penguins.head(),
    penguins.tail(),
    penguins.size,
)
species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex
0 Adelie Torgersen 39.1 18.7 181.0 3750.0 Male
1 Adelie Torgersen 39.5 17.4 186.0 3800.0 Female
2 Adelie Torgersen 40.3 18.0 195.0 3250.0 Female
3 Adelie Torgersen NaN NaN NaN NaN NaN
4 Adelie Torgersen 36.7 19.3 193.0 3450.0 Female
species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex
339 Gentoo Biscoe NaN NaN NaN NaN NaN
340 Gentoo Biscoe 46.8 14.3 215.0 4850.0 Female
341 Gentoo Biscoe 50.4 15.7 222.0 5750.0 Male
342 Gentoo Biscoe 45.2 14.8 212.0 5200.0 Female
343 Gentoo Biscoe 49.9 16.1 213.0 5400.0 Male
2408

sns.stripplot()#

[3]:
sns.stripplot(
    x=penguins.flipper_length_mm,
    jitter=1,
)
plt.show()
../../_images/02_seaborn_notebooks_4-48_categorical_stripplot_swarmplot_4_0.png

sns.swarmplot()#

[4]:
sns.swarmplot(
    x=penguins.flipper_length_mm,
)
plt.show()
../../_images/02_seaborn_notebooks_4-48_categorical_stripplot_swarmplot_6_0.png