9

I installed anaconda distro, I usualy run ipython notebook --pylab inline. I updated ipython using pip install (windows 8.1) and I don't have to write --pylab inline to start anymore

I started writing in the cell: %matplotlib nbagg or matplotlib.use['nbagg'], but when I plot something it shows this empty box: enter image description here

I was expecting the interactive plotting box.

The ipython log shows:

[IPKernelApp] ERROR | No such comm: 7cfe982045bb4d0db0f14deff7258130
3
  • I think this issue is caused by not having the latest version of matplotlib. Can you please check the console where you started ipython notebook for error messages and add them to your question? This will make it easier for others with a similar problem to find your question. Commented Mar 14, 2015 at 6:43
  • Also note that using ipython notebook --pylab inline is now deprecated. Instead you can write %matplotlib inline for static inline images, or %matplotlib notebook/``%matplotlib nbagg` for interactive plots (as you did in your question) in the first line of the notebook. Commented Mar 14, 2015 at 6:45
  • I get the same console error but in my case I do see the plots Commented Jul 19, 2016 at 14:11

2 Answers 2

10

I guess this issue is caused by a too old version of matplotlib. Using %matplotlib nbagg with ipython>=3.0 requires matplotlib>=1.4.3 (Note that %matplotlib notebook and %matplotlib nbagg are now synonyms).

Updating matplotlib via pip install --upgrade matplotlib will probably fix this issue. See also my issue-7797 on github. Thanks to jenshnielsen for this information.

Sign up to request clarification or add additional context in comments.

Comments

2

Should update both matplotlib and ipython...

sudo pip install -U ipython
sudo pip install -U matplotlib

on windows:

pip install --upgrade matplotlib
pip install --upgrade ipython

1 Comment

The deceiving thing in my case was that the error mentioned a "TCLError"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.