Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change seaborn pair plot figure size

I have the following code

sns.pairplot(data=train, 
              x_vars=['x'],
              y_vars=['y'])
plt.show()

and I am programming in jupyter notebook if that makes any difference, I want to plot a much larger figure of the plot but I cannot do it. I search the internet and the documentation mention to use the height property https://seaborn.pydata.org/generated/seaborn.pairplot.html but that always results in an error for me when using the following code.

sns.pairplot(data=train, height=3,
              x_vars=['x'],
              y_vars=['y'])
plt.show()

TypeError: pairplot() got an unexpected keyword argument 'height'

like image 813
JDOE Avatar asked Jul 18 '18 10:07

JDOE


1 Answers

The height parameter is available in seaborn 0.9.0.

sns.pairplot(..., height=3)

In seaborn 0.8.1 (or lower) this parameter was named size.

sns.pairplot(..., size=3)
like image 89
ImportanceOfBeingErnest Avatar answered Sep 28 '22 01:09

ImportanceOfBeingErnest