PlasmaCalcs.plotting.images.ImagePlotElement

class PlasmaCalcs.plotting.images.ImagePlotElement(array, *, ax=None, image_mode='pcolormesh', **kw_super)

Bases: MoviePlotElement

image 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.
__init__(array, *, ax=None, image_mode='pcolormesh', **kw_super)

Methods

__init__(array, *[, ax, image_mode])

init_im()

update_data(data)

Attributes

array

ax

fig

im

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.