【问题标题】:Set Default Saturation in Seaborn在 Seaborn 中设置默认饱和度
【发布时间】:2020-10-15 14:37:15
【问题描述】:

Seaborn 的 saturation 默认为 0.75 [1]。因此,需要为每个新地块将其设置为 1。是否可以在笔记本早期更改此默认值?类似于matplotlib下面的dpi参数。

import seaborn as sns
import matplotlib.pyplot as plt

plt.rcParams['figure.dpi']= 150

titanic = sns.load_dataset("titanic")
sns.countplot(x="class", data=titanic)
plt.figure()
sns.countplot(x="class", data=titanic, saturation=1)

【问题讨论】:

  • 查看seaborn.set

标签: python matplotlib graph seaborn


【解决方案1】:

不,除了 matplotlib rcParams 中的设置之外,seaborn 没有定义任何全局设置。但是您可以使用更饱和的默认颜色...

【讨论】:

  • 谢谢。这是否也意味着 matplotlib rcParams 中没有等效参数?我自己也找不到。
  • 正确,没有
猜你喜欢
  • 1970-01-01
  • 2018-08-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-12
  • 2017-03-04
  • 2011-05-17
  • 1970-01-01
相关资源
最近更新 更多