Package joy :: Module plans :: Class AnimatorPlan
[hide private]
[frames] | no frames]

Class AnimatorPlan

source code



Concrete class AnimatorPlan 

Wrapper for making easy animations using matplotlib and JoyApp.

USAGE:
  The AnimatorPlan constructor is given a function that takes a matplotlib
  figure object and updates the figure each iteration.

Instance Methods [hide private]
 
__init__(self, app, fun=None, fps=20)
Initialize a Plan within some JoyApp application.
source code
 
set_fps(self, fps)
Set FPS for animation
source code
 
set_generator(self, fun)
Set the frame generator function...
source code
 
behavior(self)
(default)
source code

Inherited from Plan: forDuration, isRunning, onEvent, onStart, onStop, push, start, step, stop, untilTime

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, app, fun=None, fps=20)
(Constructor)

source code 

Initialize a Plan within some JoyApp application.

Overrides: object.__init__
(inherited documentation)

set_generator(self, fun)

source code 

Set the frame generator function
INPUT:
   fun -- function -- takes matplotlib.figure and returns a generator
      that updates the figure every .next() call

behavior(self)

source code 

(default)

Override this method to implement the sequential behavior of a Plan

This method MUST be a python iterator, i.e. must contain a "yield" statement

Overrides: Plan.behavior
(inherited documentation)