clawpack/visclaw — pull request #44 by ketch (2013-07-16 11:17:12+00:00)
Title: General-purpose interactive plotting

This PR is an effort to extract a more modular tool from the Iplotclaw class. The result is the Iplot class, of which Iplotclaw is now a child class.

The Iplot class does not need to use Clawplotdata objects
and is generally ignorant of anything Clawpack-ish. It simply
provides an out layer for looping through plots, along with
simple caching of frames. It could conceivably be used in a
wide range of contexts. The user only needs to provide a function for loading a "frame" (which can be any Python object) and a function that takes that "frame" and creates a plot (actually, it could even do something besides plotting).

The first obvious application of this is to easily run arbitrary Python code within the interactive looping context, without the need to call exec on strings.

@rjleveque, could you review? I am curious to know whether you think this is useful or whether I'm duplicating something that is already there. I would like to do the same with plotpages, so that it can be used without the need for a Clawplotdata object too.

One significant change I had to make was to switch refresh_frames from being an attribute to being an argument. That is the only reason that frametools.py and data.py are affected.