Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set title on Seaborn JointPlot?

Tags:

python

seaborn

The JointPlot documentation does not show the title : can it be set?

http://seaborn.pydata.org/generated/seaborn.jointplot.html?highlight=reg

enter image description here

like image 252
WestCoastProjects Avatar asked Feb 23 '20 00:02

WestCoastProjects


People also ask

How do you add a title to a Jointplot in Seaborn?

Alternatively, just plt. suptitle("Your title here") .

How do you set up a Seaborn title?

To add a title to a single seaborn plot, you can use the . set() function. To add an overall title to a seaborn facet plot, you can use the . suptitle() function.

How do you plot a Jointplot?

A Jointplot comprises three plots. Out of the three, one plot displays a bivariate graph which shows how the dependent variable(Y) varies with the independent variable(X). Another plot is placed horizontally at the top of the bivariate graph and it shows the distribution of the independent variable(X).

What is the advantage of using Jointplot to plot data?

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.


1 Answers

this worked for me

p = sns.jointplot(x = 'x_', y = 'y_', data = df, kind="kde")
p.fig.suptitle("Your title here")
p.ax_joint.collections[0].set_alpha(0)
p.fig.tight_layout()
p.fig.subplots_adjust(top=0.95) # Reduce plot to make room 
like image 83
Ivo Avatar answered Sep 20 '22 13:09

Ivo