silx.gui.plot.actions.histogram

silx.gui.plot.actions.histogram provides actions relative to histograms for PlotWidget.

The following QAction are available:

class HistogramWidget(*args, **kwargs)[source]

Widget displaying a histogram and some statistic indicators

getPlotWidget()[source]

Returns PlotWidget use to display the histogram

resetZoom()[source]

Reset PlotWidget zoom

reset()[source]

Clear displayed information

getItem() Item | None[source]

Returns item used to display histogram and statistics.

setItem(item: Item | None)[source]

Set item from which to display histogram and statistics.

Parameters:

item

setHistogram(histogram, edges)[source]

Set displayed histogram

Parameters:
  • histogram – Bin values (N)

  • edges – Bin edges (N+1)

getHistogram(copy: bool = True)[source]

Returns currently displayed histogram.

Parameters:

copy – True to get a copy, False to get internal representation (Do not modify!)

Returns:

(histogram, edges) or None

setStatistics(min_: float | None = None, max_: float | None = None, mean: float | None = None, std: float | None = None, sum_: float | None = None)[source]

Set displayed statistic indicators.

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

QAction to plot the pixels intensities diagram

Parameters:
  • plotPlotWidget instance on which to operate

  • parent – See QAction

getHistogramWidget()[source]

Returns the widget displaying the histogram

getHistogram() ndarray | None[source]

Return the last computed histogram

Returns:

the histogram displayed in the HistogramWidget