Plot Window Control#
- squap.show_grid(x=None, y=None, alpha=None)[source]#
Show or hide the grid for either axis. For more detailed control see
squap.grid().
- squap.disable_flicker(disable=True)[source]#
This function can be called to disable the flickering that sometimes occur with fast updating plots. It does slow down plotting.
- squap.enable_autoscale(
- axis=None,
- enable=True,
- x=None,
- y=None,
Enables (or disables) auto-range for
axis, which may be"x","y", or"xy"for both (ifaxisis omitted, both axes will be changed). When enabled, the axis will automatically rescale when items are added/removed or change their shape. The argumentenablemay optionally be a float (0.0to1.0) which indicates the fraction of the data that should be visible. Also allows settingxand orytoTruefor simpler interface.- Parameters:
axis (str, optional) – Axis to autoscale. Can be
"x","y", or"xy", orNonefor both. Defaults toNone.enable (bool) – Whether to enable or disable. Defaults to
True.x (bool, optional) – optional simpler interface. Setting this to
Trueenables autoscaling in the x-direction. Defaults toNone.y (bool, optional) – optional simpler interface. Setting this to
Trueenables autoscaling in the y-direction. Defaults toNone.
- squap.disable_autoscale(
- axis=None,
- x=None,
- y=None,
Disables auto-scale. (Equivalent to
enable_autoscale(enable=False))
- squap.enable_autopan(
- axis=None,
- enable=True,
- x=None,
- y=None,
Enables (or disables) autopan for
axis, which may be"x","y", or"xy"for both (ifaxisis omitted, both axes will be changed). Only does something when autoscaling is enabled. When enabled, the axis will automatically pan to objects in the plot meaning the zoom level stays the same but the offset changes. The argumentenablemay optionally be a float (0.0to1.0) which indicates the fraction of the data that should be visible. Also allows settingxand orytoTruefor simpler interface.- Parameters:
axis (str, optional) – Axis to autoscale. Can be
"x","y", or"xy", orNonefor both. Defaults toNone.enable (bool) – Whether to enable or disable. Defaults to
True.x (bool, optional) – optional simpler interface. Setting this to
Trueenables autoscaling in the x-direction. Defaults toNone.y (bool, optional) – optional simpler interface. Setting this to
Trueenables autoscaling in the y-direction. Defaults toNone.
- squap.disable_autopan(
- axis=None,
- x=None,
- y=None,
Disables auto-scale. (Equivalent to
enable_autopan(enable=False))
- squap.lock_zoom(curves)[source]#
Locks zoom onto current range of specified
curves. Works only if they are normalcurveswith x- and y- data.- Parameters:
curves (list of
curves) –curveson which the zoom should lock
- squap.subplots(
- nrows=1,
- ncols=1,
- heightratios=None,
- widthratios=None,
Initialises a subplot window and gives a 1D or 2D list of
PlotWidgets.- Parameters:
nrows (int) – number of rows.
ncols (int) – number of columns.
heightratios (list of int, optional) – ratios between the heights of the rows. Defaults to all ones. Only integer values allowed. Not working yet!(?)
widthratios (list of int, optional) – ratios between the widths of the columns. Defaults to all ones. Only integer values allowed. Not working yet!(?)
- Returns:
Possibly nested list of
plot widgetson which different plots can be drawn.- Return type:
list of
PlotWidget
- squap.merge_plots(plots)[source]#
Merge multiple
subplotsinto a single plot. This is used for unevenly spaced grids of subplots.- Parameters:
plots (list of
SubplotWidget) – list of plots to merge.- Returns:
One new
plot objectin place of the merged plots.- Return type:
todo: adjust for QTableWidget
- squap.set_title(text)[source]#
Sets title to
str(text).- Args
text (str or Any): title, can be a string or any argument accepted by
str