Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn Jointplot Change Figsize [duplicate]

I am using Jupyter Notebook and want a full width jointplot figure.

I cant seem to get it working though.

g = sns.jointplot(x="pos", y="diff", data=plot_data)
plt.figure(figsize=(16, 6))

doesn't change the size at all.

fig, ax = plt.subplots(figsize=(16, 6))
g = sns.jointplot(ax=ax, x="pos", y="diff", data=plot_data)

Throws an error.

like image 217
Fabian Bosler Avatar asked Jun 14 '19 07:06

Fabian Bosler


People also ask

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.

How do you remove a histogram from a joint plot?

In case you want to remove the histogram/distribution plot appearing on the jointplot's axes the command that you need to use is? You cannot remove the distribution plot from the Jointplot. In case you don't want it, you can always use pyplot. scatter() or sns.


1 Answers

Use the height parameter in the jointplot function to set the size of the figure(it will be square). Refer to official docs: seaborn.pydata.org/generated/seaborn.jointplot.html

like image 183
amanb Avatar answered Nov 14 '22 21:11

amanb