在Seaborn中,diag_kind参数用于指定对角线上的绘图类型,主要用于PairGrid对象和pairplot函数中。其常用取值包括:
例如,可以通过设置diag_kind参数为"hist"来在PairGrid对象中对角线上绘制直方图:
import seaborn as sns
import matplotlib.pyplot as plt
iris = sns.load_dataset("iris")
g = sns.PairGrid(iris)
g.map_diag(sns.histplot, diag_kind="hist")
plt.show()
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:Seaborn的ax参数怎么使用