I've got a nice KDE joint plot using the following seaborn method (where return and volatility are lists of floats):
data=pd.DataFrame({"return":returns,"volatility":volatilities,})
a=sns.jointplot(x="volatility", y="return", data=data, size=10)
How can I overlay specific dots on this joint plot? For example, if I'd like a red dot superimposed on the KDE chat at location (0.2,0.2)
Draw a plot of two variables with bivariate and univariate graphs. This function provides a convenient interface to the JointGrid class, with several canned plot kinds. This is intended to be a fairly lightweight wrapper; if you need more flexibility, you should use JointGrid directly.
A jointplot is seaborn's method of displaying a bivariate relationship at the same time as a univariate profile. Essentially combining a scatter plot with a histogram (without KDE).
Changing the Seaborn Pairplot Figure Size We can also use the aspect keyword argument to control the width. By default this is set to 1, but if we set it to 2, it means we are setting the width to twice the size of the height. Seaborn pairplot after changing the figure size using height and aspect.
You can plot on the joint axis from the jointplot
like this:
a=sns.jointplot(x="volatility", y="return", data=data, size=10)
a.ax_joint.plot([0.2],[0.2],'ro')
As an aside, you can also access the x
and y
margin subplots with
a.ax_marg_x
a.ax_marg_y
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With