interactive pylab graphics
Posted: Sat Dec 11, 2010 11:36 am
matplotlib offers interactive graphics through setting of variables in ~/.matplotlib/matplotlibrc
backend : TkAgg
interactive : True
(see matplotlib.sourceforge.net/users/shell.html)
This works from a regular python shell but does not seem to work from the python shell spawned by 'nrniv -python'
python # works in this example
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib import pylab
>>> pylab.plot([1,2,1])
[<matplotlib.lines.Line2D object at 0x23ed2d0>]
>>> pylab.xlabel('hello world')
<matplotlib.text.Text object at 0x2084d90>
nrniv -python # fails here
NEURON -- VERSION 7.2 (485:31e0fdb95950) 2010-11-26
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
>>> from matplotlib import pylab
>>> pylab.plot([1,2,1]) # nothing appears
[<matplotlib.lines.Line2D object at 0x1bd50d0>]
>>> pylab.show() # graph appears but then no prompt
backend : TkAgg
interactive : True
(see matplotlib.sourceforge.net/users/shell.html)
This works from a regular python shell but does not seem to work from the python shell spawned by 'nrniv -python'
python # works in this example
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib import pylab
>>> pylab.plot([1,2,1])
[<matplotlib.lines.Line2D object at 0x23ed2d0>]
>>> pylab.xlabel('hello world')
<matplotlib.text.Text object at 0x2084d90>
nrniv -python # fails here
NEURON -- VERSION 7.2 (485:31e0fdb95950) 2010-11-26
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
>>> from matplotlib import pylab
>>> pylab.plot([1,2,1]) # nothing appears
[<matplotlib.lines.Line2D object at 0x1bd50d0>]
>>> pylab.show() # graph appears but then no prompt