# seaborn.plotting_context
> 譯者:[cancan233](https://github.com/cancan233)
```python
seaborn.plotting_context(context=None, font_scale=1, rc=None)
```
以 dict 形式返回參數,用以縮放圖形的元素。
這些參數可以影響諸如標簽大小,線條和繪圖的其他元素,但不會影響整體樣式。基礎文本時"notebook",和其他文本"paper","talk"和"poster",它們分別是 0.8,1.3 和 1.6 的 notebook 參數版本。
該函數返回一個對象,該對象可以在`with`語句中使用,臨時改變文本參數。
參數:`context`:dict, None 或者是{paper, notebook, talk, poster}其中一個
> 參數集或者是預設集合的名字
`font_scale`:浮點數,可選
> 單獨的縮放因子可以獨立縮放字體元素大小
`rc`:dict,可選
> 參數映射以覆蓋預設的 seaborn 的文本字典中的值。這只更新被視為文本定義的一部分的參數。
也可參見
設置 matplotlib 參數以調整繪圖元素返回定義圖形樣式的參數的 dict,定義繪圖的調色板。
示例:
```python
>>> c = plotting_context("poster")
```
```python
>>> c = plotting_context("notebook", font_scale=1.5)
```
```python
>>> c = plotting_context("talk", rc={"lines.linewidth": 2})
```
```python
>>> import matplotlib.pyplot as plt
>>> with plotting_context("paper"):
... f, ax = plt.subplots()
... ax.plot(x, y)
```
- seaborn 0.9 中文文檔
- Seaborn 簡介
- 安裝和入門
- 可視化統計關系
- 可視化分類數據
- 可視化數據集的分布
- 線性關系可視化
- 構建結構化多圖網格
- 控制圖像的美學樣式
- 選擇調色板
- seaborn.relplot
- seaborn.scatterplot
- seaborn.lineplot
- seaborn.catplot
- seaborn.stripplot
- seaborn.swarmplot
- seaborn.boxplot
- seaborn.violinplot
- seaborn.boxenplot
- seaborn.pointplot
- seaborn.barplot
- seaborn.countplot
- seaborn.jointplot
- seaborn.pairplot
- seaborn.distplot
- seaborn.kdeplot
- seaborn.rugplot
- seaborn.lmplot
- seaborn.regplot
- seaborn.residplot
- seaborn.heatmap
- seaborn.clustermap
- seaborn.FacetGrid
- seaborn.FacetGrid.map
- seaborn.FacetGrid.map_dataframe
- seaborn.PairGrid
- seaborn.PairGrid.map
- seaborn.PairGrid.map_diag
- seaborn.PairGrid.map_offdiag
- seaborn.PairGrid.map_lower
- seaborn.PairGrid.map_upper
- seaborn.JointGrid
- seaborn.JointGrid.plot
- seaborn.JointGrid.plot_joint
- seaborn.JointGrid.plot_marginals
- seaborn.set
- seaborn.axes_style
- seaborn.set_style
- seaborn.plotting_context
- seaborn.set_context
- seaborn.set_color_codes
- seaborn.reset_defaults
- seaborn.reset_orig
- seaborn.set_palette
- seaborn.color_palette
- seaborn.husl_palette
- seaborn.hls_palette
- seaborn.cubehelix_palette
- seaborn.dark_palette
- seaborn.light_palette
- seaborn.diverging_palette
- seaborn.blend_palette
- seaborn.xkcd_palette
- seaborn.crayon_palette
- seaborn.mpl_palette
- seaborn.choose_colorbrewer_palette
- seaborn.choose_cubehelix_palette
- seaborn.choose_light_palette
- seaborn.choose_dark_palette
- seaborn.choose_diverging_palette
- seaborn.load_dataset
- seaborn.despine
- seaborn.desaturate
- seaborn.saturate
- seaborn.set_hls_values