I really appreciate your continuing this discussion, Ben. Benjamin Root-2 wrote: > > On Mon, May 30, 2011 at 3:11 PM, Eric O LEBIGOT (EOL) < > eric.lebi...@normalesup.org> wrote: > Question: would displaying a figure (or a group of figures), pausing to > let > you close them, and then continuing to the next figures more along the > lines > of what you want? That is certainly possible with matplotlib. Since > v1.0.0, multiple calls to show() is allowed (although you may need v1.0.1 > for certain backends to do this correctly). > Yeah, the new show() is nice. However, I don't want my users to have to close the numerous opened figures one by one, even if it is done in 4 times 3 clicks (and, again, it would not be convenient to put the graphs in subplots). So, what I am really looking for is really: (1) display figures without having to use show(); and (2) do this efficiently (without automatic drawing through the interactive mode).
Benjamin Root-2 wrote: > > (…) In pyplot, nearly all > drawing commands have as the final step a call to a function called > "draw_if_interactive()". > (…) > You could call directly call > draw() on each object you want re-drawn, but you don't have to. You can > give a single call to a parent object that would call draw() for all of > its > children objects. > (…) > Thank you for these more theoretical explanations, which are interesting. However, they do not seem to apply to Matplotlib 1.0.1 on Windows (default backend), or 1.0.0 Mac OS X (default backend and GTKAgg). The main problem is that draw() does unfortunately not draw anything in non-interactive mode (this happens when there is no show() in the code)! So, with these two recent version, in *non*-interactive mode, it does not appear that "a refresh does not occur until you tell it to with a call to draw()", and things like this. There is no refresh at all, and pyplot.draw() does display anything (this is illustrated by the last program example I posted). As far as I can see, theory and practice strongly clash, about the "refreshing" effect of the draw() command (in non-interactive mode), as I can't see anything being refreshed or displayed by draw. What is your take on this? Thank you for the idea of bypassing pyplot's automatic update in interactive mode. How is this done? Doing ax.draw(ax.figure.canvas.renderer) raises a RunTime error with the default Mac OS X backend, and an AttributeError with the GTKAgg backend. How should the draw() method of Matplotlib objects be called? Now that I'm thinking of it, the crux of the problem might be that pyplot.figure() does *not* open any window, in non-interactive mode (until show() is called, which I want to avoid). This looks like a bad start if draw() is to refresh anything… Could this be the main stumbling block? Can a new window be opened in non-interactive mode (without using show())? -- View this message in context: http://old.nabble.com/Exact-semantics-of-ion%28%29---tp31728909p31738725.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users