0

I would like to use inline plotting in the ipython notebook, i.e.

%matplotlib inline
import matplotlib.pyplot as plt

x = np.arange(100)

plot(x, x**2)

should show an image.

Yet I only get the following message:

lib/python2.7/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct
  FormatterWarning,

What could be the reason for this?

matplotlib==1.3.1 and ipython==2.1.0

wirrbel
  • 3,173
  • 3
  • 26
  • 49

1 Answers1

1

Does it say anything on the terminal (i.e. the server)?

My guess is that this is most probably due to some libpng incompatibility issues. If you are running this on OS X, the following discussion may help:

libpng version incompatibility in fresh installation of IPython

Even if you aren't running OS X, similar situations may occur, if you have several copies of libpng floating around.

Community
  • 1
  • 1
DrV
  • 22,637
  • 7
  • 60
  • 72