doc/_docstrings/stripplot.ipynb
import seaborn as sns
sns.set_theme(style="whitegrid")
tips = sns.load_dataset("tips")
sns.stripplot(data=tips, x="total_bill")
sns.stripplot(data=tips, x="total_bill", y="day")
sns.stripplot(data=tips, x="day", y="total_bill")
sns.stripplot(data=tips, x="total_bill", y="day", hue="day", legend=False)
sns.stripplot(data=tips, x="total_bill", y="day", hue="sex")
sns.stripplot(data=tips, x="total_bill", y="day", hue="size")
sns.stripplot(data=tips, x="total_bill", y="day", hue="size", palette="deep")
sns.stripplot(data=tips, x="total_bill", y="day", hue="sex", dodge=True)
sns.stripplot(data=tips, x="total_bill", y="day", hue="sex", dodge=True, jitter=False)
If plotting in wide-form mode, each numeric column of the dataframe will be mapped to both x and hue:
sns.stripplot(data=tips)
sns.stripplot(data=tips, orient="h")
sns.stripplot(data=tips, x="total_bill", y="size", orient="h")
sns.stripplot(
data=tips.query("size in [2, 3, 5]"),
x="total_bill", y="size", orient="h",
)
sns.stripplot(
data=tips.query("size in [2, 3, 5]"),
x="total_bill", y="size", orient="h",
native_scale=True,
)
sns.stripplot(
data=tips, x="total_bill", y="day", hue="time",
jitter=False, s=20, marker="D", linewidth=1, alpha=.1,
)
sns.catplot(data=tips, x="time", y="total_bill", hue="sex", col="day", aspect=.5)