1

I have a row of boxplots I produce using the following code:

import seaborn as sns
g = sns.FacetGrid(df, col="Column0", sharex=False)
g.map(sns.boxplot, 'column1', 'Column2')

It works well with the exception that the plots are super tiny. I have looked at How can I change the font size using seaborn FacetGrid? and How to change figuresize using seaborn factorplot as well as the seaborn manual, but I do not find the right way to include 'size' and 'aspect' into the code. What would be the proper way to change the plot size?

EDIT

If I try it like this:

g = sns.FacetGrid(df, col="Column0", sharex=False, size=20, aspect=3)
g.map(sns.boxplot, 'Column1', 'Column2')

I get the error: ValueError: width and height must each be below 32768. Is there a restriction in size for plots that are produced the way I do it?

Community
  • 1
  • 1
sequence_hard
  • 5,115
  • 10
  • 30
  • 50
  • Did you try setting `figsize = something` ? – WoodChopper Oct 26 '15 at 09:11
  • Tried it in several ways, but did not get the desired results. My plots remain small. But maybe also because I did it wrong. what would be the appropriate way to built figsize into my code? This here `%matplotlib inline import seaborn as sns figsize=(20, 16) g = sns.FacetGrid(I, col="Origin", sharex=False) g.map(sns.boxplot, 'Year', 'ResGeneCount')` changes nothing – sequence_hard Oct 26 '15 at 09:57
  • what's `df['Column0'].unique().shape[0]`? sounds like you're trying to create a plot that's too wide. – Paul H Oct 26 '15 at 16:40

1 Answers1

1

Maybe you can try limiting maximum x and y values so that you plot will automatically adjust to values that are important.

g.set(xlim=(0, 60), ylim=(0, 14));

you say that plot is super tiny that means there are some elements present with very high values.

Alaf Azam
  • 101
  • 2
  • 6