Cannot display inline chart in IPython notebook

早过忘川 提交于 2019-12-12 06:07:04

问题


I've seen the exact same question around but the answers didn't help me. like those questions: Cannot show the graphs on ipython notebook

How to make IPython notebook matplotlib plot inline

So I decided to post a question so i could post my code, see if there is anything different... hopefully it's something very dull that I'm missing. although the code runs perfectly in ipython shell. Thanks in advance !

%matplotlib inline

import matplotlib
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 3*np.pi, 500)
plt.plot(x, np.sin(x**2))
plt.title('A simple chirp')
plt.show()

PS: I'm using Anaconda distribution, and I launched notebook by the shortcut that comes with it IPython (Python 2.7) Notebook

PS2: the output I get is virtually none.

来源:https://stackoverflow.com/questions/32011581/cannot-display-inline-chart-in-ipython-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!