My near-newbie suspicion is that you're using more tools than you need  
and having them interfere with each other. The show() command  
generally doesn't return control to whatever  called it until you've  
closed the shown window 
(http://bytes.com/topic/python/answers/635142-matplotlib-basic-question 
).

if running ipython -pylab from a terminal, successive plot commands  
display a window with the successively plotted lines in it;

if I start the python interpreter from an emacs file in Python-mode,  
and import pylab, and plot() twice, I also get a single figure window  
with the successively plotted lines in it -- *until* I switch focus to  
the figure window, after which calling plot() from the interpreter  
doesn't do anything to the figure until I close the first figure.   
(This does seem buggy, or at least suboptimal. I'm using Aquamacs on  
OS X, don't know if the same interpreter would be called on ubuntu.)

Practically speaking, I use the interpreter to check tiny bits of  
syntax, ipython to noodle around with more complicated syntax or  
reasoning, and M-! from emacs to execute a whole .py file that I know  
is mostly right. I hardly ever use show() at all, but rather  
savefig(), with a file-directory window showing me the results as I go.

If that doesn't work for you, the experts probably need a more precise  
bug report to figure out what would.

Chloe Lewis
Grad student, ESPM, UC Berkeley



On May 25, 2010, at 8:40 PM, Ted Rosenbaum wrote:

> Hi,
> I am a real newbie at matplotlib, so I apologize if this is an  
> obvious question.
> I am running ipython in emacs and while the first time I use the  
> show() command in the ipython buffer the graph shows up fine,  
> subsequent times that I call the command it, the graph does not show  
> up.  I am on ubuntu 10.04 (64) and I built the matplotlib library  
> from source.
> I am trying to get the graphs to show up the subsequent times as  
> well (sorry for the pun).
> Thanks for any help.
>
> ----------------------------------------
> Ted Rosenbaum
> Graduate Student
> Department of Economics
> Yale University
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to