TDSData.plot#
- TDSData.plot(yidx, xidx=(0,), *, a=None, ytimes=None, ycalc=None, left=None, right=None, ymin=None, ymax=None, xlabel=None, ylabel=None, xheader=None, yheader=None, legend=None, grid=False, greyscale=False, latex=True, dpi=None, line_width=1.0, font_size=12, savefig=None, save_format=None, show=True, title=None, linestyles=None, use_bqplot=False, hline1=None, hline2=None, vline1=None, vline2=None, hline=None, vline=None, fig=None, ax=None, backend=None, set_xlim=True, set_ylim=True, autoscale=False, legend_bbox=None, legend_loc=None, legend_ncol=1, figsize=None, color=None, **kwargs)[source]#
Entry function for plotting.
This function retrieves the x and y values based on the xidx and yidx inputs, applies scaling functions ytimes and ycalc sequentially, and delegates the plotting to the backend.
- Parameters:
- yidxlist or int
The indices for the y-axis variables
- xidxtuple or int, optional
The index for the x-axis variable
- atuple or list, optional
The 0-indexed sub-indices into yidx to plot.
- ytimesfloat, optional
A scaling factor to apply to all y values.
- leftfloat
The starting value of the x axis
- rightfloat
The ending value of the x axis
- yminfloat
The minimum value of the y axis
- ymaxfloat
The maximum value of the y axis
- ylabelstr
Text label for the y axis
- yheaderlist
A list containing the variable names for the y-axis variable
- titlestr
Title string to be shown at the top
- fig
Existing figure object to draw the axis on.
- ax
Existing axis object to draw the lines on.
- Returns:
- (fig, ax)
Figure and axis handles for matplotlib backend.
- fig
Figure object for bqplot backend.
- Other Parameters:
- ycalc: callable, optional
A callable to apply to all y values after scaling with ytimes.
- xlabelstr
Text label for the x axis
- xheaderlist
A list containing the variable names for the x-axis variable
- legendbool
True to show legend and False otherwise
- legend_ncolint
Number of columns in legend
- legend_bboxtuple of two floats
legend box to anchor
- gridbool
True to show grid and False otherwise
- latexbool
True to enable latex and False to disable
- greyscalebool
True to use greyscale, False otherwise
- savefigbool or str
True to save to png figure file. str is treated as the output file name.
- save_formatstr
File extension string (pdf, png or jpg) for the savefig format
- dpiint
Dots per inch for screen print or save. savefig uses a minimum of 200 dpi
- line_widthfloat
Plot line width
- font_sizefloat
Text font size (labels and legends)
- figsizetuple
Figure size passed when creating new figure
- showbool
True to show the image
- backendstr or None
bqplot to use the bqplot backend in notebook. None for matplotlib.
- hline1: float, optional
Dashed horizontal line 1
- hline2: float, optional
Dashed horizontal line 2
- vline1: float, optional
Dashed horizontal line 1
- vline2: float, optional
Dashed vertical line 2
- hline: float or Iterable
y-axis location of horizontal line(s)
- vline: float or Iterable
x-axis location of vertical line(s)