I'm using LightTable with the Anaconda Python distribution (for Mac). I'm trying to get the Matplotlib inline plots to appear for a simple code like the following (but with the plt.show()
command uncommented):
# -*- coding: ascii -*-
import numpy as np
import matplotlib.pyplot as plt
def myplot():
x = np.linspace(0.0, np.pi, 400)
y = np.sin(x)
plt.plot(x, y, lw=2, c='r')
#plt.show()
return(np.trapz(y,x))
myplot()
Upon uncommenting the plt.show()
in the snippet above, and running myplot()
, a white rectangle briefly appears on the screen, which then disappears. After this, upon commenting out plt.show()
again, the python inline evaluation in LightTable becomes inactive (except with a restart of LightTable). Also, the connect bar shows python
and not ipython
, even though both python and ipython (Anaconda distribution) are on my path, and LightTable appears to be able to see them (as illustrated in the image below):
Could it be a libpng problem (see libpng version incompatibility in fresh installation of IPython), or do I need to put ipython notebook --matplotlib=inline
somewhere in the LightTable configuration?
My current version of LightTable: 0.7.2. No issues on Ubuntu 14.04.
Update: I found a partial fix, via a reinstall of Anaconda 2.1.0 (but without any of the extra packages):
rm -rf ~/anaconda
bash ~/Downloads/Anaconda-2.1.0-MacOSX-x86_64.sh
However, a fresh re-install of Anaconda 2.2.0 did not work:
rm -rf ~/anaconda
bash ~/Downloads/Anaconda-2.2.0-MacOSX-x86_64.sh
So obviously downgrading to Anaconda 2.1.0 is a partial fix, but in the long run, I hope to keep my packages up to date. Could there be a problem with one of the packages (screenshot of version numbers below)?
LightTable + Anaconda 2.1.0:
LightTable + Anaconda 2.2.0: