doc/_docstrings/pointplot.ipynb
import seaborn as sns
sns.set_theme(style="whitegrid")
penguins = sns.load_dataset("penguins")
flights = sns.load_dataset("flights")
sns.pointplot(data=penguins, x="island", y="body_mass_g")
sns.pointplot(data=penguins, x="island", y="body_mass_g", hue="sex")
sns.pointplot(
data=penguins,
x="island", y="body_mass_g", hue="sex",
markers=["o", "s"], linestyles=["-", "--"],
)
sns.pointplot(data=penguins, x="island", y="body_mass_g", errorbar="sd")
sns.pointplot(
data=penguins, x="body_mass_g", y="island",
errorbar=("pi", 100), capsize=.4,
color=".5", linestyle="none", marker="D",
)
sns.pointplot(data=penguins, x="sex", y="bill_depth_mm", hue="species", dodge=True)
sns.stripplot(
data=penguins, x="species", y="bill_depth_mm", hue="sex",
dodge=True, alpha=.2, legend=False,
)
sns.pointplot(
data=penguins, x="species", y="bill_depth_mm", hue="sex",
dodge=.4, linestyle="none", errorbar=None,
marker="_", markersize=20, markeredgewidth=3,
)
flights_wide = flights.pivot(index="year", columns="month", values="passengers")
sns.pointplot(flights_wide)
sns.pointplot(flights_wide["Jun"])
sns.pointplot(flights_wide["Jun"], formatter=lambda x: f"'{x % 1900}")
ax = sns.pointplot(flights_wide["Jun"], native_scale=True)
ax.plot(1955, 335, marker="*", color="r", markersize=10)