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

1 Answer 1

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.

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

Comments

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.