Regression fit over a strip plot#
seaborn components used: set_theme()
, load_dataset()
, catplot()
, regplot()
import seaborn as sns
sns.set_theme()
mpg = sns.load_dataset("mpg")
sns.catplot(
data=mpg, x="cylinders", y="acceleration", hue="weight",
native_scale=True, zorder=1
)
sns.regplot(
data=mpg, x="cylinders", y="acceleration",
scatter=False, truncate=False, order=2, color=".2",
)