Live plotting in Jupyter notebooks using the nbagg backend and matplotlib
Plot x/y lines or x/y/z heatmap data. The first trace may be included in the constructor, other traces can be added with MatPlot.add()
*args – Sequence of data to plot. Each element will have its own subplot. An element can be a single array, or a sequence of arrays. In the latter case, all arrays will be plotted in the same subplot.
figsize (Tuple[float, float]) – (width, height) tuple in inches to pass to plt.figure. If not provided, figsize is determined from subplots shape
interval – period in seconds between update checks
subplots – either a sequence (args) or mapping (kwargs) to pass to plt.subplots. default is a single simple subplot (1, 1) you can use this to pass kwargs to the plt.figure constructor
num – integer or None specifies the index of the matplotlib figure window to use. If None then open a new window
**kwargs – passed along to MatPlot.add() to add the first data trace
adds one trace to this MatPlot.
use_offset – Whether or not ticks can have an offset
**kwargs – with the exceptions given in the notes below (mostly the data!), these are passed directly to the matplotlib plotting routine.
Plot handle for trace
Notes
The following special cases apply for kwargs that are not passed directly to the plotting routine.
subplot: the 1-based axes number to append to (default 1)
if kwargs include z, we will draw a heatmap (ax.pcolormesh) x, y, and z are passed as positional args to pcolormesh
without z we draw a scatter/lines plot (ax.plot) x, y, and fmt (if present) are passed as positional args
Clears the plot window and removes all subplots and traces so that the window can be reused.
Provides default figsize for given subplots. :param subplots: shape (nrows, ncols) of subplots :type subplots: Tuple[Int, Int]
for given subplot shape
Tuple[float, float]
Rescale axis and units for axis that are in standard units i.e. V, s J … to m μ, m This scales units defined in BasePlot.standardunits only to avoid prefixes on combined or non standard units
Save current plot to filename, by default to the location corresponding to the default title.
filename (Optional[str]) – Location of the file
Perform a tight layout on the figure. A bit of additional spacing at the top is also added for the title.
update the plot. The DataSets themselves have already been updated in update, here we just push the changes to the plot.