Skip to content
Advertisement

How to make sns.jointplot histogram into a smooth kde?

I’m plotting some data using sns.jointplot and I want the data inside the scatterplot to remain as points and the histograms on the side to be kde plots instead. I’ve tried using the kind='kde' argument, but this changes the data inside to not look like points in a scatterplot anymore. I’ve searched around for a bit and can’t find how.

Here’s my code for the plot:

JavaScript

enter image description here

Advertisement

Answer

You could create a JointGrid and then plot the central and the marginal plots separately:

JavaScript

JointGrid with separate central and marginal plots

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement