Note added in 2019: in modern versions of Seaborn, the size argument has been renamed to height .
To be a little more specific:
%matplotlib inline import seaborn as sns exercise = sns.load_dataset("exercise") # Defaults are size=5, aspect=1 sns.factorplot("kind", "pulse", "diet", exercise, kind="point", size=2, aspect=1) sns.factorplot("kind", "pulse", "diet", exercise, kind="point", size=4, aspect=1) sns.factorplot("kind", "pulse", "diet", exercise, kind="point", size=4, aspect=2)
You want to pass the "size" or "aspect" arguments to sns.factorplot () when plotting.
The size will change the height while maintaining the aspect ratio (therefore, it will also increase when changing only the size).
The aspect will change the width while maintaining a constant height.
The above code should be able to run locally in the ipython notebook.
The size of the graphs in these examples is reduced to show the effects, and also because the graphs from the above code were quite large when saved in png format. It also shows that the size / aspect includes the margin legend.
size = 2 aspect = 1

size = 4, aspect = 1

size = 4 aspect = 2

In addition, all other useful parameters / arguments and default values ββfor this charting function can be viewed after loading the 'sns' module:
help(sns.factorplot)
Fernando Hernandez Feb 27 '15 at 12:24 2015-02-27 12:24
source share