【问题标题】:Importing seaborn in python script messing up plot style在 python 脚本中导入 seaborn 会破坏绘图风格
【发布时间】:2015-09-06 04:10:11
【问题描述】:

下面附上两张图。生成它们的脚本的唯一区别是第二个脚本多了一行:

import seaborn as sns

我还没有设置任何 seaborn 样式。只是导入 seaborn 正在改变情节风格,即使在不使用 seaborn 的情节中也是如此。有什么办法可以导入 seaborn(用于其他地块),并且不改变不使用它的地块的样式?

【问题讨论】:

标签: python pandas seaborn


【解决方案1】:

检查一下

import seaborn.apionly as sns or from seaborn.apionly import lmplot

http://stanford.edu/~mwaskom/software/seaborn/whatsnew.html

【讨论】:

    猜你喜欢
    • 2014-03-21
    • 2022-01-03
    • 2019-02-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-04
    • 1970-01-01
    • 2018-10-20
    • 1970-01-01
    相关资源
    最近更新 更多