[英]Is it possible to add KDE estimation to hisgram in a pairplot plot with seaborn?
我正在用 seaborn 繪制配對圖(見圖)。 我想將 KDE 估計值添加到直方圖中。 是否可以? 此外,是否有可能使直方圖不透明以便更好地看到它們? 謝謝
如果我理解正確,這可能會滿足您的要求
import seaborn as sns sns.set(style="ticks") df = sns.load_dataset("iris") p = sns.PairGrid(df, vars=['sepal_length', 'sepal_width'], hue="species") p = p.map_offdiag(sns.scatterplot) p = p.map_diag(sns.distplot, hist=True, kde=True, hist_kws={'alpha':0.5})
這是截圖。。
[英]Seaborn pairplot not showing KDE
[英]Add labels to Seaborn bivariate KDE plot
[英]Seaborn pairplot kde diagonal default behavior
[英]Why are no colors shown in kde subplots in seaborn pairplot?
[英]legends on seaborn kde plot
[英]Plot subplots using seaborn pairplot
[英]Specifying data to plot in Seaborn pairplot
[英]Limit the range of x in seaborn distplot KDE estimation
[英]Seaborn pairplot off-diagonal KDE with two classes
[英]Seaborn -xtick labels in KDE plot
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.