45.md 1.3 KB
Newer Older
W
init  
wizardforcel 已提交
1 2
# seaborn.set

W
wizardforcel 已提交
3
```python
W
init  
wizardforcel 已提交
4 5 6
seaborn.set(context='notebook', style='darkgrid', palette='deep', font='sans-serif', font_scale=1, color_codes=True, rc=None)
```

W
wizardforcel 已提交
7
一步设定自定义图表参数。
W
init  
wizardforcel 已提交
8

W
wizardforcel 已提交
9
每个参数可以被直接或者间接设定,参见下方的引用参数以获取更多信息。
W
init  
wizardforcel 已提交
10

W
wizardforcel 已提交
11
参数:context:字符串或者字典
W
init  
wizardforcel 已提交
12

W
wizardforcel 已提交
13
> 绘图上下文参数,参见[`plotting_context()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.plotting_context.html#seaborn.plotting_context)
W
init  
wizardforcel 已提交
14

W
wizardforcel 已提交
15
style:字符串或者字典
W
init  
wizardforcel 已提交
16

W
wizardforcel 已提交
17
> 坐标轴样式参数,参见[`axes_style()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.axes_style.html#seaborn.axes_style)
W
init  
wizardforcel 已提交
18

W
wizardforcel 已提交
19
palette:字符串或者序列
W
init  
wizardforcel 已提交
20

W
wizardforcel 已提交
21
> 调色板,参见[`color_palette()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.color_palette.html#seaborn.color_palette)
W
init  
wizardforcel 已提交
22

W
wizardforcel 已提交
23
font:字符串
W
init  
wizardforcel 已提交
24

W
wizardforcel 已提交
25
> 字体,参见matplotlib字体管理
W
init  
wizardforcel 已提交
26

W
wizardforcel 已提交
27
font_scale:浮点数,可选的
W
init  
wizardforcel 已提交
28

W
wizardforcel 已提交
29
> 独立缩放因子,以独立缩放字体元素的大小。
W
init  
wizardforcel 已提交
30

W
wizardforcel 已提交
31
color_codes:布尔值
W
init  
wizardforcel 已提交
32

W
wizardforcel 已提交
33
> 如果为真并且调色板是一个seaborn调色板,重新映射速记颜色代码(比如,"b","g","r",等等)到调色板上的颜色。
W
init  
wizardforcel 已提交
34

W
wizardforcel 已提交
35
rc:字典或者None
W
init  
wizardforcel 已提交
36

W
wizardforcel 已提交
37
> rc参数字典映射以覆盖以上参数。