How do I enlarge my boxplot?

Question:

enter image description here

How can I enlarge my boxplot in jupyter? I can’t find any optional parameters that allows me to do so. specifically using seaborn.

Asked By: The Dodo

||

Answers:

You can try using rc parameter in seaborn:

sns.set(rc={'figure.figsize':(11,8)})

where (11,8) refers 11 inch width and 8 inch height.

You can also enlarge font by passing font_scale parameter along with style to change background from default. Using example from [seaborn boxplot example][1]:

import seaborn as sns
%matplotlib inline

sns.set(rc={'figure.figsize':(11,8)}, font_scale=1.5, style='whitegrid')

tips = sns.load_dataset("tips")
sns.boxplot(x="day", y="total_bill", data=tips);

Screenshot for result in Jupyter Notebook:

The default with no change would give:
enter image description here

After the change as above would give:
enter image description here

Answered By: niraj