Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting ipython notebook to plot inline

64 views
Skip to first unread message

Frank Franklin

unread,
Oct 9, 2012, 2:02:17 PM10/9/12
to
I've just managed to install ipython and get it to run by typing ipython notebook --pylab=inline

Now I'm getting the following error when I try to plot something in ipython notebook:
AttributeError: 'module' object has no attribute 'FigureCanvas'

I've tried using imports to make this work:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)

But for some reason I still get this error. Anybody else know what's going on here? All of the print statements I've done before have worked, and I actually got my plots to work when I didn't set --pylab=inline, though they came up in a separate window and I want them to stay in the ipython notebook.

Frank Franklin

unread,
Oct 11, 2012, 10:45:12 AM10/11/12
to
Ok, so just to add to this, there is no problem plotting when I used the following command in my terminal to start the notebook:
ipython notebook
The only problem is that this plots my figures outside of the notebook page, and I really want to get everything into the notebook, since that's the point of the install.

but for some reason when I add the --pylab=inline that all the tutorials mention I get the AttributeError I mentioned before. I'm starting to wonder if this is a problem with my machine setup, if I'm missing something else that ipython notebook needs to do inline plotting.

Any help on this would be appreciated -- at this point I'm banging my head against the wall and solution doesn't seem to have surfaced through googling.
0 new messages