0.12.0.dev0
  • Gallery
  • Tutorial
  • API
  • Site
      • 发行说明
      • 安装
      • 示例库
      • 教程
      • API引用
      • 引用
      • 档案文件
  • Page
      • seaborn.axes_style

seaborn.axes_style¶

seaborn.axes_style(style=None, rc=None)¶

返回绘图的美学样式的参数dict。

这会影响轴的颜色、是否默认启用栅格以及其他美学元素。

此函数返回可用于 with 语句临时更改样式参数。

参数
styledict、None或{darkgrid、whitegrid、dark、white、ticks}之一

参数字典或预配置集的名称。

rc可选的

参数映射以覆盖预设seaborn样式字典中的值。这仅更新被视为样式定义一部分的参数。

参见

set_style

为seaborn主题设置matplotlib参数

plotting_context

返回参数dict以缩放绘图元素

color_palette

定义打印的调色板

实例

>>> st = axes_style("whitegrid")
>>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8})
>>> import matplotlib.pyplot as plt
>>> with axes_style("white"):
...     f, ax = plt.subplots()
...     ax.plot(x, y)               

Back to top

© Copyright 2012-2021, Michael Waskom. 构建基于 Sphinx 3.4.1.