Full API documentation for applets¶
applets.plot
module¶
-
class
scan_framework.applets.plot.
Plot
(args)[source]¶ Base class for plot applets. Provides a basic framework for plot applets. When data has changed, dataset values are loaded, reshaped (optional), validated, cleaned, and plotted.
-
__init__
(args)[source]¶ When initializing PlotWidget, parent and background are passed to
GraphicsWidget.__init__()
and all others are passed toPlotItem.__init__()
.
-
__module__
= 'scan_framework.applets.plot'¶
-
_load
(data, key, ds_only=True, default=None)[source]¶ Helper method to load a single dataset value and assign it to an attribute of self.
Falls back to an explicit value being specified in arguments or a given default value when the dataset doesn’t exist.
-
data_changed
(data, mods)[source]¶ Data changed handler. load, reshape, validate, clean, and then plot the new data.
-
get_style
(key, i=0)[source]¶ Helper method to get a style value using a dotted key. For example, self.style[‘background’][‘color’] can be returned by passing key=’background.color’
-
style
= {'background': {'color': 'w'}, 'foreground': {'color': 'k'}}¶ default colors are white background with black foreground
-
-
class
scan_framework.applets.plot.
SimpleApplet
(main_widget_class, cmd_description=None, default_update_delay=0.0)[source]¶ -
__init__
(main_widget_class, cmd_description=None, default_update_delay=0.0)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
__module__
= 'scan_framework.applets.plot'¶
-
applets.plot_hist
module¶
-
class
scan_framework.applets.plot_hist.
HistogramPlot
(args)[source]¶ -
__init__
(args)[source]¶ When initializing PlotWidget, parent and background are passed to
GraphicsWidget.__init__()
and all others are passed toPlotItem.__init__()
.
-
__module__
= 'scan_framework.applets.plot_hist'¶
-
labelStyle
= {'font-bolt': 'True', 'font-size': '12pt'}¶
-
applets.plot_hist_ntrace_white
module¶
-
class
scan_framework.applets.plot_hist_ntrace_white.
HistogramPlot
(args)[source]¶ -
__init__
(args)[source]¶ When initializing PlotWidget, parent and background are passed to
GraphicsWidget.__init__()
and all others are passed toPlotItem.__init__()
.
-
__module__
= 'scan_framework.applets.plot_hist_ntrace_white'¶
-
labelStyle
= {'font-bolt': 'True', 'font-size': '12pt'}¶
-
applets.plot_xy
module¶
-
class
scan_framework.applets.plot_xy.
SimpleApplet
(main_widget_class, cmd_description=None, default_update_delay=0.0)[source]¶ -
__module__
= 'scan_framework.applets.plot_xy'¶
-
-
class
scan_framework.applets.plot_xy.
XYPlot
(args)[source]¶ Applet for plotting X-Y data. A single trace is plotted by providing two 1D arrays for the x and y values. Multiple traces can be plotted by providing two 2D arrays for the x and y values. The plot style can be customized by modifiying the style attribute. When plotting multiple traces, each trace uses a separate symbol for its data points defined by
style['plot']['symbol']
.- Default Styles
style[‘background’][‘color’] white
style[‘foreground’][‘color’] black
style[‘fit’][‘pen’] fitline color is red with a width of 4
style[‘plot’][‘symbol’] data point symbols for each trace. Order is o, t, d, s, d which repeats for >5 traces.
style[‘plot’][‘size’] data point symbol sizes for each trace. Order is 10, 12, 15, 10, 10 which repeats for >5 traces.
style[‘plot’][‘color’] data point symbol colors for each trace. Order is r, b, g, m, c, y which repeats for >5 traces.
style[‘plot’][‘axes’][‘size’] axes size defaults to 15
style[‘plot’][‘axes’][‘tick_offset’] tick offset defaults to 30
style[‘plot’][‘axes’][‘label’][‘font-size’] axes label font sizes default to 15pt
style[‘plot’][‘axes’][‘label’][‘bold’] axes label fonts are bold by default
style[‘title’][‘size’] plot title size defaults to 20px
-
__module__
= 'scan_framework.applets.plot_xy'¶
-
started
= False¶
-
style
= {'axes': {'label': {'font-bold': 'True', 'font-size': '15pt'}, 'size': 15, 'tick_offset': 30}, 'background': {'color': 'w'}, 'fit': {'pen': <PyQt5.QtGui.QPen object>}, 'foreground': {'color': 'k'}, 'plot': {'color': ['r', 'b', 'g', 'm', 'c', 'y'], 'color2': ['b', 'g', 'm', 'c', 'y', 'r'], 'pen': None, 'pen2': None, 'size': [10, 12, 15, 10, 10], 'size2': [12, 15, 10, 10, 10], 'symbol': ['o', 't', 'd', 's', 'd'], 'symbol2': ['t', 'd', 's', 'd', 'o']}, 'title': {'size': '20px'}}¶ Specifies the style of the plot.
applets.plot_xy_ntrace_white
module¶
-
exception
scan_framework.applets.plot_xy_ntrace_white.
LoadError
[source]¶ -
__module__
= 'scan_framework.applets.plot_xy_ntrace_white'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-