如何放大箱线图?

The*_*odo 5 python pandas seaborn jupyter figsize

在此输入图像描述

如何在 jupyter 中放大箱线图?我找不到任何允许我这样做的可选参数。特别是使用seaborn。

stu*_*ent 3

您可以尝试rc在以下位置使用参数seaborn

sns.set(rc={'figure.figsize':(11,8)})
Run Code Online (Sandbox Code Playgroud)

其中(11,8)指 11 英寸宽度和 8 英寸高度。

您还可以通过传递 font_scale 参数和样式来放大字体,以更改默认背景。使用 [seaborn boxplot 示例][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);
Run Code Online (Sandbox Code Playgroud)

Jupyter Notebook 中的结果截图:

不做任何更改的默认值将给出: 在此输入图像描述

进行上述更改后将给出: 在此输入图像描述