ImagePlotElement
- class PlasmaCalcs.plotting.images.ImagePlotElement(array, *, ax=None, image_mode='pcolormesh', **kw_super)
Bases:
MoviePlotElementimage on an Axes.
“image” refers to a matplotlib.cm.ScalarMappable object, e.g. the result of imshow or pcolormesh.- array: array-like object, probably ndim=2.
- the data to be plotted. will be stored in self.data[‘array’]
- ax: None or Axes
- the attached mpl.axes.Axes object.None –> will use self.ax=plt.gca() when getting self.ax for the first time.
- image_mode: str (‘imshow’ or ‘pcolormesh’) (default: pcolormesh)
- tells whether this image will be pcolormesh or imshow.
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__.
init_im()initialize image; actually plot the data.
update_data(data)update the plot using data['array'].
Attributes
array for plot.
the axes containing this image
figure containing this image
the image object (instance of matplotlib.cm.ScalarMappable)
- 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.
- property array
array for plot. Internally, stored at self.data[‘array’]
- property ax
the axes containing this image
- property fig
figure containing this image
- property im
the image object (instance of matplotlib.cm.ScalarMappable)
- init_im()
initialize image; actually plot the data.
stores plotted object in self.im & returns self.im.
- update_data(data)
update the plot using data[‘array’].
return list of all updated matplotlib Artist objects.