PlasmaCalcs.plotting.lines.XarrayLinePlotElement
- class PlasmaCalcs.plotting.lines.XarrayLinePlotElement(array, *, ax=None, aspect=None, **kw_super)
Bases:
MoviePlotElementplot line of 1D data.- array: xarray.DataArray, probably ndim=1.
- the data to be plotted.coords with ndim>0, dtype=object will be converted to strings suitable for ticklabels.
- label: UNSET or str (default: UNSET)
- label for this plot element, to be included in a legend.For xarrays, will label.format(**xarray_nondim_coords(array)).
To view or adjust plot settings in self, see self.plot_settings, or help(self.plot_settings).- __init__(array, *, ax=None, aspect=None, **kw_super)
Methods
__init__(array, *[, ax, aspect])update_data(data)Attributes
- property array
- array for plot. Internally, stored at self.data[‘array’]
- property ax
- the axes containing this line plot
- property fig
- figure containing this line plot
- init_line()
- initialize the line plot; actually plot the data.stores plotted object in self.line and returns self.line.
- property line
- line plot (instance of matplotlib.lines.Line2D)
- update_data(data)
- update the plot using data[‘array’].return the list of all updated matplotlib Artist objects.