【问题标题】:%matplotlib inline does not show any plot on jupyter notebook%matplotlib inline 在 jupyter notebook 上不显示任何绘图
【发布时间】:2016-12-30 12:32:02
【问题描述】:

matplotlib.pyplot 运行了很长时间,最后屏幕上没有显示任何情节

但是matplotlib.back_end() 给出了以下内容

u'TkAgg'

有人可以提出解决方案吗?

注意:我使用 pip install matplotlib 安装了 matplotlib

【问题讨论】:

  • 我认为matplotlib.pyplot 会生成一个图表,但如果你希望它显示(交互式),你必须调用matplotlib.pyplot.show
  • 我使用了matplotlib.pyplot.plot ( test_data["coln1"], test_data["coln2"], "."),但仍然没有输出@doctorlove
  • ...表示导入需要很长时间?
  • 不,这需要相当长的时间,然后最终停止但没有任何输出
  • 尝试将%matplotlib notebook%matplotlib inline 作为第一个单元格运行。

标签: matplotlib ipython jupyter jupyter-notebook


【解决方案1】:

我在 Mac OSX 10.10.5 上使用 jupyter notebook 时遇到了类似的问题

最后我通过使用命令重新安装 IPython 和依赖项来修复它

pip install -U --force-reinstall numpy matplotlib pyzmq jinja2 ipython

【讨论】:

    猜你喜欢
    • 2017-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-10
    • 1970-01-01
    • 2017-09-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多