具有两个分类变量的三元直方图#

使用的 seaborn 组件: set_theme()
, load_dataset()
, displot()
import seaborn as sns
sns.set_theme(style="dark")
diamonds = sns.load_dataset("diamonds")
sns.displot(
data=diamonds, x="price", y="color", col="clarity",
log_scale=(True, False), col_wrap=4, height=4, aspect=.7,
)