StatsWidget: Display a set of statictics for plot items

Module containing widgets displaying stats from items of a plot.

StatsWidget class

class StatsWidget(parent=None, plot=None, stats=None)[source]

Bases: PySide2.QtWidgets.QWidget

Widget displaying a set of Stat to be displayed on a StatsTable and to be apply on items contained in the Plot Also contains options to:

  • compute statistics on all the data or on visible data only
  • show statistics of all items or only the active one
Parameters:
  • parent – Qt parent
  • plot – the plot containing items on which we want statistics.

BasicStatsWidget class

class BasicStatsWidget(parent=None, plot=None)[source]

Bases: silx.gui.plot.StatsWidget.StatsWidget

Widget defining a simple set of Stat to be displayed on a StatsWidget.

Parameters:
  • parent – Qt parent
  • plot – the plot containing items on which we want statistics.

StatsTable class

class StatsTable(parent=None, plot=None)[source]

Bases: silx.gui.widgets.TableWidget.TableWidget

TableWidget displaying for each curves contained by the Plot some information:

  • legend
  • minimal value
  • maximal value
  • standard deviation (std)
Parameters:
  • parent – The widget’s parent.
  • plotPlotWidget instance on which to operate
callbackCurve = None

Associate the curve legend to his first item

setStats(statsHandler)[source]
Parameters:statsHandler – Set the statistics to be displayed and how to format them using
Return type:StatsHandler
setPlot(plot)[source]

Define the plot to interact with

Parameters:plot – the plot containing the items on which statistics are applied
Return type:PlotWidget
clear()[source]

Clear all existing items

setDisplayOnlyActiveItem(displayOnlyActItem)[source]
Parameters:displayOnlyActItem (bool) – True if we want to only show active item
setStatsOnVisibleData(b)[source]

Warning

When visible data is activated we will process to a simple filtering of visible data by the user. The filtering is a simple data sub-sampling. No interpolation is made to fit data to boundaries.

Parameters:b (bool) – True if we want to apply statistics only on visible data