An easier way to create figure and group of axes; useful?

I like this approach better, because one problem with doing it in the
mpl Artist layer is that one artist setter may call another, and
trigger a series of calls to draw for what is only a single draw at
the interactive prompt. ipython knows when an interactive call is
made, and can issue a draw. The trick will be to manage something
like a "needdraw" flag for all mpl figures, which is set when any
property contained in that fiugure changed and flushed when any call
to draw is made. If we maintain this flag on all mpl setters and
flush it after all mpl draws, the ipython prompt hook could check the
flag and draw if needed when interactive is True.

Not sure it is worth the effort, since like JJ I tend to mostly use
the pyplot functions when working from the interactive shell and don't
mind calling "draw" when using the API. I don't think API usage
should be encouraged for the interactive prompt -- but I don't think
it should be discouraged either -- it's just that in practice most
experienced users use the state machine in this case because it is
less typing and we needn't be pedantic, even when teaching <wink>.

JDH

···

On Mon, Mar 22, 2010 at 11:50 AM, Jörgen Stenarson <jorgen.stenarson@...173...> wrote:

Would it be possible to put the draw in the ipython_prompt hook. That
way it is always called after you have done something.