您可以尝试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 中的结果截图:
| 归档时间: |
|
| 查看次数: |
9160 次 |
| 最近记录: |