PlasmaCalcs.plotting.movies.MoviePlotElement
- class PlasmaCalcs.plotting.movies.MoviePlotElement(data={}, **kw_super)
Bases:
PlotSettingsMixinupdatable 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.- __init__(data={}, **kw_super)
Methods
__init__([data])update_data(data)- update_data(data)
- update the plot using relevant keys in data.return list of all updated matplotlib Artist objects.