I tried following methods, but I always got error.
I tried:
1. Use ipython3 notebook --matplotlib inline
in Mac console to launch iPython notebook.
Or/And
2. Use %matplotlib inline
in the first cell of iPython notebook.
I got this error:
/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct FormatterWarning,
I followed the solution @cel showed me (uninstall XQuartz), but I got the same error:
/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct FormatterWarning,
And if I execute both 1 (ipython3 notebook --matplotlib inline
) and 2 (%matplotlib inline
), I only got this message:
<matplotlib.figure.Figure at 0x1089fab50>
Additional info:
1. OS X (10.9.5), Python 3.3.3
2. If I use ipython3 notebook --matplotlib=osx
to launch ipython notebook, the figure pops up in a different window (not inline).