'How to remove diagonal plot from pairplot
I used
g=sns.pairplot(df,hue="Class")
to do pairplot as shown in the picture. How do I get rid of diagonal plots?
Solution 1:[1]
The best I could come up with was to hide the lines and shaded areas of the plot by passing appropriate diag_kws. The plot still happens, it’s just for all intents and purposes invisible:
g = sns.pairplot(df, hue="Class",
diag_kind="kde",
diag_kws={"linewidth": 0, "shade": False})
Solution 2:[2]
You should try this :
def hide_current_axis(*args, **kwds):
plt.gca().set_visible(False)
g.map_diag(hide_current_axis)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Jeremy Caney |
