按数据子集对直方图进行分面#

使用的 seaborn 组件: set_theme()
、load_dataset()
、displot()
import seaborn as sns
sns.set_theme(style="darkgrid")
df = sns.load_dataset("penguins")
sns.displot(
df, x="flipper_length_mm", col="species", row="sex",
binwidth=3, height=3, facet_kws=dict(margin_titles=True),
)