Re: [Matplotlib-users] Show() in emacs
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
Re: [Matplotlib-users] Show() in emacs
On Tue, May 25, 2010 at 10:40 PM, Ted Rosenbaum ted.rosenb...@yale.edu 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. Take a look at http://matplotlib.sourceforge.net/users/shell.html It may help to configure your matplotlib backend to TkAgg. See http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend http://matplotlib.sourceforge.net/users/customizing.html Also, you will probably want to figure out how to make emacs launch ipython in pylab mode, in which case you won't need show at all. ipython will take care of everything for you in pylab mode. JDH -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Show() in emacs
Jonn-- Thanks very much. Customizing the backend to TkAgg solved the problem. Chloe--thanks for your advice as well! On Wed, May 26, 2010 at 3:21 PM, John Hunter jdh2...@gmail.com wrote: On Tue, May 25, 2010 at 10:40 PM, Ted Rosenbaum ted.rosenb...@yale.edu 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. Take a look at http://matplotlib.sourceforge.net/users/shell.html It may help to configure your matplotlib backend to TkAgg. See http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend http://matplotlib.sourceforge.net/users/customizing.html Also, you will probably want to figure out how to make emacs launch ipython in pylab mode, in which case you won't need show at all. ipython will take care of everything for you in pylab mode. JDH -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users