MoviePlotElement

class PlasmaCalcs.plotting.movies.MoviePlotElement(data={}, **kw_super)

Bases: PlotSettingsMixin

updatable element in a plot. Put into an MoviePlotNode to connect update routines.

Pneumonic:

Element connects directly to matplotlib plotting routines;
Node connects elements to matplotlib animation rountines.
Element only needs to contain the minimal amount of info to plot the current data;
Node may contain more info such as all data for the entire movie.
Subclasses must define:
update_data(dict) -> list of updated matplotlib Artist objects.
INPUTS HERE:
data: dict
contains the data to be plotted.
Subclasses might ask for data values as input instead of data dict,
e.g. XarrayImagePlotElement.__init__ expects input array, not {‘array’: array}.
But, all subclasses __init__ should define self.data = dict(…) appropriately.
__init__ here makes a copy, to avoid unintentional changes.
Additional kwargs can be any PlotSettings; see help(self.plot_settings) for details.

Methods

__init_subclass__(*args_super, **kw)

appends note about using self.plot_settings, to cls.__doc__.

update_data(data)

update the plot using relevant keys in data.

classmethod __init_subclass__(*args_super, **kw)

appends note about using self.plot_settings, to cls.__doc__.

if “PlotSettings” or “plot_settings” appears in cls.__doc__, do NOT append this note;
assuming instead that this means the doc already mentions how to use plot_settings.
update_data(data)

update the plot using relevant keys in data.

return list of all updated matplotlib Artist objects.