【问题标题】:jupyter notebook + seaborn + %matplotlib notebook -> grid not visiblejupyter notebook + seaborn + %matplotlib notebook -> 网格不可见
【发布时间】:2016-08-16 12:12:03
【问题描述】:

如果我尝试在 jupyter notebook 中使用

%matplotlib notebook
import seaborn as sns
... 
plt.grid()

网格不可见。 如果我在普通 python 中尝试相同(不是 jupyter notebook,没有 %matplotlib),网格很好。

【问题讨论】:

  • 我也有同样的问题。无法确定如何打开它。

标签: matplotlib jupyter seaborn


【解决方案1】:

不带参数调用plt.grid() 会切换网格状态。因为默认 seaborn 样式中有一个网格,所以您将其关闭。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-04
    • 2017-05-11
    • 2017-05-05
    • 2020-05-08
    • 2017-09-18
    • 1970-01-01
    • 2019-11-24
    相关资源
    最近更新 更多