Plotting API documentation¶
Classes¶
- class cheta.plot.MsidPlot(msid, fmt='-b', fmt_minmax='-c', **plot_kwargs)[source]¶
Bases:
object
Make an interactive plot for exploring the MSID data.
This method opens a new plot figure (or clears the current figure) and plots the MSID
vals
versustimes
. This plot can be panned or zoomed arbitrarily and the data values will be fetched from the archive as needed. Depending on the time scale,iplot
will display either full resolution, 5-minute, or daily values. For 5-minute and daily values the min and max values are also plotted.Once the plot is displayed and the window is selected by clicking in it, the plot limits can be controlled by the usual methods (window selection, pan / zoom). In addition following key commands are recognized:
a: autoscale for full data range in x and y m: toggle plotting of min/max values p: pan at cursor x y: toggle autoscaling of y-axis z: zoom at cursor x ?: print help
Example:
dat = fetch.Msid('aoattqt1', '2011:001', '2012:001', stat='5min') iplot = cheta.MsidPlot(dat)
Caveat: the
MsidPlot()
class is not meant for use within scripts, and may give unexpected results if used in combination with other plotting commands directed at the same plot figure.- Parameters:
msid – MSID object
fmt – plot format for values (default=”-b”)
fmt_minmax – plot format for mins and maxes (default=”-c”)
plot_kwargs – additional plotting keyword args