[SciPy-user] going through a lot of plots

Robert Kern robert.kern@gmail....
Wed May 13 18:18:31 CDT 2009

On Wed, May 13, 2009 at 17:56, David Warde-Farley <dwf@cs.toronto.edu> wrote:
> I wonder if anyone has a good pattern they'd like to share for how to
> page through a lot of plots (mayavi.mlab or matplotlib or Chaco or
> whatever).
> I find myself in this situation a lot: I'm looking at a sequence of
> plots, one for each piece of data in a collection. I usually find
> myself writing a loop with a plot command followed by raw_input()so
> that I hit enter in the terminal window IPython session to move to the
> next item.  I usually make this conditional so that I can process in
> batch without looking at the plots if I choose.
> This has the effect of producing a newline in the terminal every time
> I want to move on to the next plot, which is far from ideal,
> especially in the situation where I'm not printing anything else in
> that window.
> I figure there probably is a general way of solving this problem
> satisfactorily that I just haven't thought of, but any toolkit-
> specific ideas would be appreciated too. I'd rather avoid mucking with
> event-handlers since it would force control flow to depend on the
> plotting toolkit, removing the ability to just "turn off" plot-n-wait.

I usually write up a quick Traits UI that embeds the Chaco Plot with a
slider or whatever to select the dataset. This lets me move forwards
and backwards and abort in the middle much more naturally.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list