diff --git a/docs/seaborn.axes_style.md b/docs/seaborn.axes_style.md new file mode 100644 index 0000000000000000000000000000000000000000..73f326eac1d2eb29b0a0b2379497a0f37541cd5c --- /dev/null +++ b/docs/seaborn.axes_style.md @@ -0,0 +1,43 @@ +# seaborn.axes_style + +--- + +```python +seaborn.axes_style(style=None,rc=None) +``` + +返回一个参数数组作为图表的自定义风格。 + +它会影响诸如坐标轴的颜色,是否默认启用网格,和其他自定义元素。 + +这个函数返回一个对象,该对象可以在with语句中使用以临时改变样式参数。 + +参数:style:字典,None,或者{darkgrid, whitegrid, dark, white, ticks}其中一个。 + +> 一个参数字典或者一个预配置集的名称。 + +rc:字典,可选的 + +> 给定参数映射以覆盖预先设定的(默认的)seaborn样式参数字典 + +参见 + +给一个seaborn主题设定matplotlib参数,返回一个参数字典,以缩放图标元素并可以定义图表的调色板。 + +例子: + +```python +>>> st = axes_style("whitegrid") +``` + +```python +>>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8}) +``` + +```python +>>> import matplotlib.pyplot as plt +>>> with axes_style("white"): +... f, ax = plt.subplots() +... ax.plot(x, y) +``` + diff --git a/docs/seaborn.set.md b/docs/seaborn.set.md new file mode 100644 index 0000000000000000000000000000000000000000..6243e74953dc810b78774caba91fc2eb38c1e75e --- /dev/null +++ b/docs/seaborn.set.md @@ -0,0 +1,39 @@ +# seaborn.set + +--- + +```python +seaborn.set(context='notebook', style='darkgrid', palette='deep', font='sans-serif', font_scale=1, color_codes=True, rc=None) +``` + +一步设定自定义图表参数。 + +每个参数可以被直接或者间接设定,参见下方的引用参数以获取更多信息。 + +参数:context:字符串或者字典 + +> 绘图上下文参数,参见[`plotting_context()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.plotting_context.html#seaborn.plotting_context) + +style:字符串或者字典 + +> 坐标轴样式参数,参见[`axes_style()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.axes_style.html#seaborn.axes_style) + +palette:字符串或者序列 + +> 调色板,参见[`color_palette()`](https://github.com/apachecn/seaborn-doc-zh/blob/master/docs/seaborn.color_palette.html#seaborn.color_palette) + +font:字符串 + +> 字体,参见matplotlib字体管理 + +font_scale:浮点数,可选的 + +> 独立缩放因子,以独立缩放字体元素的大小。 + +color_codes:布尔值 + +> 如果为真并且调色板是一个seaborn调色板,重新映射速记颜色代码(比如,"b","g","r",等等)到调色板上的颜色。 + +rc:字典或者None + +> rc参数字典映射以覆盖以上参数。 \ No newline at end of file diff --git a/docs/seaborn.set_style.md b/docs/seaborn.set_style.md new file mode 100644 index 0000000000000000000000000000000000000000..908766c950494b43f0a05d55e6313d6530e9e40f --- /dev/null +++ b/docs/seaborn.set_style.md @@ -0,0 +1,34 @@ +# seaborn.set_style + +--- + +```python +seaborn.set_style(style=None, rc=None) +``` + +设定图表的自定义风格。 + +它会影响诸如坐标轴的颜色,网格默认是否开启和其他自定义元素。 + +参数:style:字典,None,或者{darkgrid, whitegrid, dark, white, ticks}其中一个。 + +> 一个参数字典或者一个预配置集的名称。 + +rc:字典,可选 + +> 一个字典映射去覆盖seaborn样式字典中的预设值。这仅仅会更新那些被认为是样式定义一部分的参数。 + +参见 + +返回一个参数字典或者使用with语句以临时设置style.set 的参数来缩放图表的元素或者设定图表的默认调色板。 + +例子: + +```python +>>> set_style("whitegrid") +``` + +```python +>>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8}) +``` +