plotpy.histogram¶
- The histogram module provides histogram related objects:
plotpy.histogram.HistogramItem
: an histogram plot itemplotpy.histogram.ContrastAdjustment
: the contrast adjustment panelplotpy.histogram.LevelsHistogram
: a curve plotting widget used by the contrast adjustment panel to compute, manipulate and display the image levels histogram
HistogramItem
objects are plot items (derived from QwtPlotItem) that may
be displayed on a 2D plotting widget like plotpy.curve.CurvePlot
or plotpy.image.ImagePlot
.
Example¶
Simple histogram plotting example:
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see plotpy/__init__.py for details)
"""Histogram test"""
SHOW = True # Show test in GUI-based test launcher
from plotpy.plot import CurveDialog
from plotpy.builder import make
def test():
"""Test"""
from numpy.random import normal
data = normal(0, 1, (2000, ))
win = CurveDialog(edit=False, toolbar=True, wintitle="Histogram test")
plot = win.get_plot()
plot.add_item(make.histogram(data))
win.show()
win.exec_()
if __name__ == "__main__":
# Create QApplication
import guidata
_app = guidata.qapplication()
test()
Reference¶
-
class
plotpy.histogram.
HistogramItem
(curveparam=None, histparam=None)[source]¶ A Qwt item representing histogram data
-
set_hist_source
(src)[source]¶ Set histogram source
source:
Object with method get_histogram, e.g. objects derived fromplotpy.image.ImageItem
-
get_hist_source
()[source]¶ Return histogram source
source:
Object with method get_histogram, e.g. objects derived fromplotpy.image.ImageItem
-
set_logscale
(state)[source]¶ Sets whether we use a logarithm or linear scale for the histogram counts
-
attach
(plot)¶ Attach the item to a plot.
This method will attach a QwtPlotItem to the QwtPlot argument. It will first detach the QwtPlotItem from any plot from a previous call to attach (if necessary). If a None argument is passed, it will detach from any QwtPlot it was attached to.
Parameters: plot (qwt.plot.QwtPlot) – Plot widget See also
-
baseline
()¶ Returns: Value of the baseline See also
-
boundingRect
()¶ Return the bounding rectangle of the data
-
brush
()¶ Returns: Brush used to fill the area between lines and the baseline See also
-
closePolyline
(painter, xMap, yMap, polygon)¶ Complete a polygon to be a closed polygon including the area between the original polygon and the baseline.
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- polygon (QPolygonF) – Polygon to be completed
-
closestPoint
(pos)¶ Find the closest curve point for a specific position
Parameters: pos (QPoint) – Position, where to look for the closest curve point Returns: tuple (index, dist) dist is the distance between the position and the closest curve point. index is the index of the closest curve point, or -1 if none can be found ( f.e when the curve has no points ).
Note
closestPoint() implements a dumb algorithm, that iterates over all points
-
data
()¶ Returns: the series data
-
dataRect
()¶ Returns: Bounding rectangle of the series or an invalid rectangle, when no series is stored See also
qwt.plot_series.QwtSeriesData.boundingRect()
-
dataSize
()¶ Returns: Number of samples of the series See also
setData()
,qwt.plot_series.QwtSeriesData.size()
-
defaultIcon
(brush, size)¶ Return a default icon from a brush
The default icon is a filled rectangle used in several derived classes as legendIcon().
Parameters: - brush (QBrush) – Fill brush
- size (QSizeF) – Icon size
Returns: A filled rectangle
-
deserialize
(reader)¶ Deserialize object from HDF5 reader
-
detach
()¶ Detach the item from a plot.
This method detaches a QwtPlotItem from any QwtPlot it has been associated with.
See also
-
directPaint
(from_, to)¶ When observing a measurement while it is running, new points have to be added to an existing seriesItem. This method can be used to display them avoiding a complete redraw of the canvas.
Setting plot().canvas().setAttribute(Qt.WA_PaintOutsidePaintEvent, True) will result in faster painting, if the paint engine of the canvas widget supports this feature.
Parameters: - from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted
See also
-
draw
(painter, xMap, yMap, canvasRect)¶ Draw the complete series
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
-
drawCurve
(painter, style, xMap, yMap, canvasRect, from_, to)¶ Draw the line part (without symbols) of a curve interval.
Parameters: - painter (QPainter) – Painter
- style (int) – curve style, see QwtPlotCurve.CurveStyle
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawDots
(painter, xMap, yMap, canvasRect, from_, to)¶ Draw dots
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawLines
(painter, xMap, yMap, canvasRect, from_, to)¶ Draw lines
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawSeries
(painter, xMap, yMap, canvasRect, from_, to)¶ Draw an interval of the curve
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawSteps
(painter, xMap, yMap, canvasRect, from_, to)¶ Draw steps
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawSticks
(painter, xMap, yMap, canvasRect, from_, to)¶ Draw sticks
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
drawSymbols
(painter, symbol, xMap, yMap, canvasRect, from_, to)¶ Draw symbols
Parameters: - painter (QPainter) – Painter
- symbol (qwt.symbol.QwtSymbol) – Curve symbol
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- from (int) – Index of the first point to be painted
- to (int) – Index of the last point to be painted. If to < 0 the curve will be painted to its last point.
See also
-
fillCurve
(painter, xMap, yMap, canvasRect, polygon)¶ Fill the area between the curve and the baseline with the curve brush
Parameters: - painter (QPainter) – Painter
- xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas
- polygon (QPolygonF) – Polygon - will be modified !
See also
-
getCanvasMarginHint
(xMap, yMap, canvasRect)¶ Calculate a hint for the canvas margin
When the QwtPlotItem::Margins flag is enabled the plot item indicates, that it needs some margins at the borders of the canvas. This is f.e. used by bar charts to reserve space for displaying the bars.
The margins are in target device coordinates ( pixels on screen )
Parameters: - xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
- canvasRect (QRectF) – Contents rectangle of the canvas in painter coordinates
See also
QwtPlot.getCanvasMarginsHint()
,QwtPlot.updateCanvasMargins()
,
-
get_closest_coordinates
(x, y)¶ Renvoie les coordonnées (x’,y’) du point le plus proche de (x,y) Méthode surchargée pour ErrorBarSignalCurve pour renvoyer les coordonnées des pointes des barres d’erreur
-
get_data
()¶ Return curve data x, y (NumPy arrays)
-
hide
()¶ Hide the item
-
hit_test
(pos)¶ Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)
-
init
()¶ Initialize internal members
-
isVisible
()¶ Returns: True if visible See also
-
is_empty
()¶ Return True if item data is empty
-
is_private
()¶ Return True if object is private
-
is_readonly
()¶ Return object readonly state
-
itemChanged
()¶ Update the legend and call QwtPlot.autoRefresh() for the parent plot.
See also
QwtPlot.legendChanged()
,QwtPlot.autoRefresh()
-
legendChanged
()¶ Update the legend of the parent plot.
See also
QwtPlot.updateLegend()
,itemChanged()
-
legendData
()¶ Return all information, that is needed to represent the item on the legend
QwtLegendData is basically a list of QVariants that makes it possible to overload and reimplement legendData() to return almost any type of information, that is understood by the receiver that acts as the legend.
The default implementation returns one entry with the title() of the item and the legendIcon().
Returns: Data, that is needed to represent the item on the legend See also
title()
,legendIcon()
,qwt.legend.QwtLegend
-
legendIcon
(index, size)¶ Parameters: - index (int) – Index of the legend entry (ignored as there is only one)
- size (QSizeF) – Icon size
Returns: Icon representing the curve on the legend
See also
qwt.plot.QwtPlotItem.setLegendIconSize()
,qwt.plot.QwtPlotItem.legendData()
-
legendIconSize
()¶ Returns: Legend icon size See also
-
move_local_shape
(old_pos, new_pos)¶ Translate the shape such that old_pos becomes new_pos in canvas coordinates
-
move_with_selection
(delta_x, delta_y)¶ Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
-
orientation
()¶ Returns: Orientation of the plot item See also
:py:meth`setOrientation()`
-
paintRect
(xMap, yMap)¶ Calculate the bounding paint rectangle of 2 maps
Parameters: - xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
Returns: Bounding paint rectangle of the scale maps, not normalized
-
pen
()¶ Returns: Pen used to draw the lines
-
plot
()¶ Returns: attached plot
-
rtti
()¶ Returns: QwtPlotItem.Rtti_PlotCurve
-
sample
(index)¶ Parameters: index (int) – Index Returns: Sample at position index
-
scaleRect
(xMap, yMap)¶ Calculate the bounding scale rectangle of 2 maps
Parameters: - xMap (qwt.scale_map.QwtScaleMap) – Maps x-values into pixel coordinates.
- yMap (qwt.scale_map.QwtScaleMap) – Maps y-values into pixel coordinates.
Returns: Bounding scale rect of the scale maps, not normalized
-
select
()¶ Select item
-
serialize
(writer)¶ Serialize object to HDF5 writer
-
setAxes
(xAxis, yAxis)¶ Set X and Y axis
The item will painted according to the coordinates of its Axes.
Parameters: - xAxis (int) – X Axis (QwtPlot.xBottom or QwtPlot.xTop)
- yAxis (int) – Y Axis (QwtPlot.yLeft or QwtPlot.yRight)
See also
-
setAxis
(xAxis, yAxis)¶ Set X and Y axis
Warning
setAxis has been removed in Qwt6: please use
setAxes()
instead
-
setBaseline
(value)¶ Set the value of the baseline
The baseline is needed for filling the curve with a brush or the Sticks drawing style.
The interpretation of the baseline depends on the orientation(). With Qt.Horizontal, the baseline is interpreted as a horizontal line at y = baseline(), with Qt.Vertical, it is interpreted as a vertical line at x = baseline().
The default value is 0.0.
Parameters: value (float) – Value of the baseline See also
-
setBrush
(brush)¶ Assign a brush.
In case of brush.style() != QBrush.NoBrush and style() != QwtPlotCurve.Sticks the area between the curve and the baseline will be filled.
In case not brush.color().isValid() the area will be filled by pen.color(). The fill algorithm simply connects the first and the last curve point to the baseline. So the curve data has to be sorted (ascending or descending).
Parameters: brush (QBrush or QColor) – New brush See also
-
setCurveAttribute
(attribute, on=True)¶ Specify an attribute for drawing the curve
Supported curve attributes:
- QwtPlotCurve.Inverted
Parameters: - attribute (int) – Curve attribute
- on (bool) – On/Off
See also
-
setData
(*args, **kwargs)¶ Initialize data with a series data object or an array of points.
-
setData(data):
Parameters: data (qwt.plot_series.QwtSeriesData) – Series data (e.g. QwtPointArrayData instance)
-
setData(xData, yData, [size=None], [finite=True]):
Initialize data with x and y arrays.
This signature was removed in Qwt6 and is temporarily maintained here to ensure compatibility with Qwt5.
Same as setSamples(x, y, [size=None], [finite=True])
Parameters: - x – List/array of x values
- y – List/array of y values
- size (int or None) – size of xData and yData
- finite (bool) – if True, keep only finite array elements (remove all infinity and not a number values), otherwise do not filter array elements
See also
-
-
setItemAttribute
(attribute, on=True)¶ Toggle an item attribute
Parameters: - attribute (int) – Attribute type
- on (bool) – True/False
See also
-
setItemInterest
(interest, on=True)¶ Toggle an item interest
Parameters: - attribute (int) – Interest type
- on (bool) – True/False
See also
-
setLegendAttribute
(attribute, on=True)¶ Specify an attribute how to draw the legend icon
Legend attributes:
- QwtPlotCurve.LegendNoAttribute
- QwtPlotCurve.LegendShowLine
- QwtPlotCurve.LegendShowSymbol
- QwtPlotCurve.LegendShowBrush
Parameters: - attribute (int) – Legend attribute
- on (bool) – On/Off
See also
-
setLegendIconSize
(size)¶ Set the size of the legend icon
The default setting is 8x8 pixels
Parameters: size (QSize) – Size See also
-
setOrientation
(orientation)¶ Set the orientation of the item. Default is Qt.Horizontal.
The orientation() might be used in specific way by a plot item. F.e. a QwtPlotCurve uses it to identify how to display the curve int QwtPlotCurve.Steps or QwtPlotCurve.Sticks style.
See also
:py:meth`orientation()`
-
setPen
(*args)¶ Build and/or assign a pen, depending on the arguments.
-
setPen
(color, width, style) Build and assign a pen
In Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it non cosmetic (see QPen.isCosmetic()). This method signature has been introduced to hide this incompatibility.
Parameters: - color (QColor) – Pen color
- width (float) – Pen width
- style (Qt.PenStyle) – Pen style
-
setPen
(pen) Assign a pen
Parameters: pen (QPen) – New pen
-
-
setRectOfInterest
(rect)¶ Set a the “rect of interest” for the series
Parameters: rect (QRectF) – Rectangle of interest See also
qwt.plot_series.QwtSeriesData.setRectOfInterest()
-
setRenderHint
(hint, on=True)¶ Toggle a render hint
Parameters: - hint (int) – Render hint
- on (bool) – True/False
See also
-
setSamples
(*args, **kwargs)¶ Initialize data with an array of points.
-
setSamples(data):
Parameters: data (qwt.plot_series.QwtSeriesData) – Series data (e.g. QwtPointArrayData instance)
-
setSamples(samples):
Same as setData(QwtPointArrayData(samples))
Parameters: samples – List/array of points
-
setSamples(xData, yData, [size=None], [finite=True]):
Same as setData(QwtPointArrayData(xData, yData, [size=None]))
Parameters: - xData – List/array of x values
- yData – List/array of y values
- size (int or None) – size of xData and yData
- finite (bool) – if True, keep only finite array elements (remove all infinity and not a number values), otherwise do not filter array elements
See also
qwt.plot_series.QwtPointArrayData
-
-
setStyle
(style)¶ Set the curve’s drawing style
Valid curve styles:
- QwtPlotCurve.NoCurve
- QwtPlotCurve.Lines
- QwtPlotCurve.Sticks
- QwtPlotCurve.Steps
- QwtPlotCurve.Dots
- QwtPlotCurve.UserCurve
Parameters: style (int) – Curve style See also
-
setSymbol
(symbol)¶ Assign a symbol
The curve will take the ownership of the symbol, hence the previously set symbol will be delete by setting a new one. If symbol is None no symbol will be drawn.
Parameters: symbol (qwt.symbol.QwtSymbol) – Symbol See also
-
setTitle
(title)¶ Set a new title
Parameters: title (qwt.text.QwtText or str) – Title See also
-
setVisible
(on)¶ Show/Hide the item
Parameters: on (bool) – Show if True, otherwise hide See also
-
setXAxis
(axis)¶ Set the X axis
The item will painted according to the coordinates its Axes.
Parameters: axis (int) – X Axis (QwtPlot.xBottom or QwtPlot.xTop) See also
-
setYAxis
(axis)¶ Set the Y axis
The item will painted according to the coordinates its Axes.
Parameters: axis (int) – Y Axis (QwtPlot.yLeft or QwtPlot.yRight) See also
-
setZ
(z)¶ Set the z value
Plot items are painted in increasing z-order.
Parameters: z (float) – Z-value See also
z()
,QwtPlotDict.itemList()
-
set_data
(x, y)¶ - Set curve data:
- x: NumPy array
- y: NumPy array
-
set_movable
(state)¶ Set item movable state
-
set_private
(state)¶ Set object as private
-
set_readonly
(state)¶ Set object readonly state
-
set_resizable
(state)¶ Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
-
set_rotatable
(state)¶ Set item rotatable state
-
set_selectable
(state)¶ Set item selectable state
-
show
()¶ Show the item
-
style
()¶ Returns: Style of the curve See also
-
swapData
(series)¶ Replace a series without deleting the previous one
Parameters: series (qwt.plot_series.QwtSeriesData) – New series Returns: Previously assigned series
-
symbol
()¶ Returns: Current symbol or None, when no symbol has been assigned See also
-
testCurveAttribute
(attribute)¶ Returns: True, if attribute is enabled See also
-
testItemAttribute
(attribute)¶ Test an item attribute
Parameters: attribute (int) – Attribute type Returns: True/False See also
-
testItemInterest
(interest)¶ Test an item interest
Parameters: attribute (int) – Interest type Returns: True/False See also
-
testLegendAttribute
(attribute)¶ Parameters: attribute (int) – Legend attribute Returns: True, when attribute is enabled See also
-
testRenderHint
(hint)¶ Test a render hint
Parameters: attribute (int) – Render hint Returns: True/False See also
-
title
()¶ Returns: Title of the item See also
-
unselect
()¶ Unselect item
-
updateLegend
(item, data)¶ Update the item to changes of the legend info
Plot items that want to display a legend ( not those, that want to be displayed on a legend ! ) will have to implement updateLegend().
updateLegend() is only called when the LegendInterest interest is enabled. The default implementation does nothing.
Parameters: - item (qwt.plot.QwtPlotItem) – Plot item to be displayed on a legend
- data (list) – Attributes how to display item on the legend
Note
Plot items, that want to be displayed on a legend need to enable the QwtPlotItem.Legend flag and to implement legendData() and legendIcon()
-
xAxis
()¶ Returns: xAxis
-
yAxis
()¶ Returns: yAxis
-
-
class
plotpy.histogram.
ContrastAdjustment
(parent=None)[source]¶ Contrast adjustment tool
-
style
() → QStyle¶
-
class
RenderFlags
(QWidget.RenderFlags)¶ QWidget.RenderFlags(int) QWidget.RenderFlags()
-
ContrastAdjustment.
acceptDrops
() → bool¶
-
ContrastAdjustment.
accessibleDescription
() → str¶
-
ContrastAdjustment.
accessibleName
() → str¶
-
ContrastAdjustment.
actionEvent
(QActionEvent)¶
-
ContrastAdjustment.
actions
() → list-of-QAction¶
-
ContrastAdjustment.
activateWindow
()¶
-
ContrastAdjustment.
addAction
(QAction)¶
-
ContrastAdjustment.
addActions
(list-of-QAction)¶
-
ContrastAdjustment.
adjustSize
()¶
-
ContrastAdjustment.
autoFillBackground
() → bool¶
-
ContrastAdjustment.
backgroundRole
() → QPalette.ColorRole¶
-
ContrastAdjustment.
baseSize
() → QSize¶
-
ContrastAdjustment.
blockSignals
(bool) → bool¶
-
ContrastAdjustment.
changeEvent
(QEvent)¶
-
ContrastAdjustment.
childAt
(QPoint) → QWidget¶ QWidget.childAt(int, int) -> QWidget
-
ContrastAdjustment.
children
() → list-of-QObject¶
-
ContrastAdjustment.
childrenRect
() → QRect¶
-
ContrastAdjustment.
childrenRegion
() → QRegion¶
-
ContrastAdjustment.
clearFocus
()¶
-
ContrastAdjustment.
clearMask
()¶
-
ContrastAdjustment.
close
() → bool¶
-
ContrastAdjustment.
colorCount
() → int¶
-
ContrastAdjustment.
connect
(QObject, SIGNAL(), QObject, SLOT(), Qt.ConnectionType=Qt.AutoConnection) → bool¶ QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
-
ContrastAdjustment.
contentsMargins
() → QMargins¶
-
ContrastAdjustment.
contentsRect
() → QRect¶
-
ContrastAdjustment.
contextMenuEvent
(QContextMenuEvent)¶
-
ContrastAdjustment.
contextMenuPolicy
() → Qt.ContextMenuPolicy¶
-
ContrastAdjustment.
create
(sip.voidptr window=None, bool initializeWindow=True, bool destroyOldWindow=True)¶
-
ContrastAdjustment.
create_dockwidget
(title)¶ Add to parent QMainWindow as a dock widget
-
ContrastAdjustment.
cursor
() → QCursor¶
-
ContrastAdjustment.
customContextMenuRequested
¶ QWidget.customContextMenuRequested[QPoint] [signal]
-
ContrastAdjustment.
deleteLater
()¶
-
ContrastAdjustment.
depth
() → int¶
-
ContrastAdjustment.
destroy
(bool destroyWindow=True, bool destroySubWindows=True)¶
-
ContrastAdjustment.
destroyed
¶ QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
-
ContrastAdjustment.
devType
() → int¶
-
ContrastAdjustment.
disconnect
(QObject, SIGNAL(), QObject, SLOT()) → bool¶ QObject.disconnect(QObject, SIGNAL(), callable) -> bool
-
ContrastAdjustment.
dragEnterEvent
(QDragEnterEvent)¶
-
ContrastAdjustment.
dragLeaveEvent
(QDragLeaveEvent)¶
-
ContrastAdjustment.
dragMoveEvent
(QDragMoveEvent)¶
-
ContrastAdjustment.
dropEvent
(QDropEvent)¶
-
ContrastAdjustment.
dumpObjectInfo
()¶
-
ContrastAdjustment.
dumpObjectTree
()¶
-
ContrastAdjustment.
dynamicPropertyNames
() → list-of-QByteArray¶
-
ContrastAdjustment.
effectiveWinId
() → sip.voidptr¶
-
ContrastAdjustment.
emit
(SIGNAL(), ...)¶
-
ContrastAdjustment.
enabledChange
(bool)¶
-
ContrastAdjustment.
ensurePolished
()¶
-
ContrastAdjustment.
enterEvent
(QEvent)¶
-
ContrastAdjustment.
event
(QEvent) → bool¶
-
ContrastAdjustment.
eventFilter
(QObject, QEvent) → bool¶
-
ContrastAdjustment.
find
(sip.voidptr) → QWidget¶
-
ContrastAdjustment.
findChild
(type, str name='') → QObject¶ QObject.findChild(tuple, str name=’‘) -> QObject
-
ContrastAdjustment.
findChildren
(type, str name='') → list-of-QObject¶ QObject.findChildren(tuple, str name=’‘) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
-
ContrastAdjustment.
focusInEvent
(QFocusEvent)¶
-
ContrastAdjustment.
focusNextChild
() → bool¶
-
ContrastAdjustment.
focusNextPrevChild
(bool) → bool¶
-
ContrastAdjustment.
focusOutEvent
(QFocusEvent)¶
-
ContrastAdjustment.
focusPolicy
() → Qt.FocusPolicy¶
-
ContrastAdjustment.
focusPreviousChild
() → bool¶
-
ContrastAdjustment.
focusProxy
() → QWidget¶
-
ContrastAdjustment.
focusWidget
() → QWidget¶
-
ContrastAdjustment.
font
() → QFont¶
-
ContrastAdjustment.
fontChange
(QFont)¶
-
ContrastAdjustment.
fontInfo
() → QFontInfo¶
-
ContrastAdjustment.
fontMetrics
() → QFontMetrics¶
-
ContrastAdjustment.
foregroundRole
() → QPalette.ColorRole¶
-
ContrastAdjustment.
frameGeometry
() → QRect¶
-
ContrastAdjustment.
frameSize
() → QSize¶
-
ContrastAdjustment.
geometry
() → QRect¶
-
ContrastAdjustment.
getContentsMargins
() -> (int, int, int, int)¶
-
ContrastAdjustment.
grabGesture
(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))¶
-
ContrastAdjustment.
grabKeyboard
()¶
-
ContrastAdjustment.
grabMouse
()¶ QWidget.grabMouse(QCursor)
-
ContrastAdjustment.
grabShortcut
(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int¶
-
ContrastAdjustment.
graphicsEffect
() → QGraphicsEffect¶
-
ContrastAdjustment.
graphicsProxyWidget
() → QGraphicsProxyWidget¶
-
ContrastAdjustment.
hasFocus
() → bool¶
-
ContrastAdjustment.
hasMouseTracking
() → bool¶
-
ContrastAdjustment.
height
() → int¶
-
ContrastAdjustment.
heightForWidth
(int) → int¶
-
ContrastAdjustment.
heightMM
() → int¶
-
ContrastAdjustment.
hide
()¶
-
ContrastAdjustment.
inherits
(str) → bool¶
-
ContrastAdjustment.
inputContext
() → QInputContext¶
-
ContrastAdjustment.
inputMethodEvent
(QInputMethodEvent)¶
-
ContrastAdjustment.
inputMethodHints
() → Qt.InputMethodHints¶
-
ContrastAdjustment.
inputMethodQuery
(Qt.InputMethodQuery) → object¶
-
ContrastAdjustment.
insertAction
(QAction, QAction)¶
-
ContrastAdjustment.
insertActions
(QAction, list-of-QAction)¶
-
ContrastAdjustment.
installEventFilter
(QObject)¶
-
ContrastAdjustment.
isActiveWindow
() → bool¶
-
ContrastAdjustment.
isAncestorOf
(QWidget) → bool¶
-
ContrastAdjustment.
isEnabled
() → bool¶
-
ContrastAdjustment.
isEnabledTo
(QWidget) → bool¶
-
ContrastAdjustment.
isEnabledToTLW
() → bool¶
-
ContrastAdjustment.
isFullScreen
() → bool¶
-
ContrastAdjustment.
isHidden
() → bool¶
-
ContrastAdjustment.
isLeftToRight
() → bool¶
-
ContrastAdjustment.
isMaximized
() → bool¶
-
ContrastAdjustment.
isMinimized
() → bool¶
-
ContrastAdjustment.
isModal
() → bool¶
-
ContrastAdjustment.
isRightToLeft
() → bool¶
-
ContrastAdjustment.
isTopLevel
() → bool¶
-
ContrastAdjustment.
isVisible
() → bool¶
-
ContrastAdjustment.
isVisibleTo
(QWidget) → bool¶
-
ContrastAdjustment.
isWidgetType
() → bool¶
-
ContrastAdjustment.
isWindow
() → bool¶
-
ContrastAdjustment.
isWindowModified
() → bool¶
-
ContrastAdjustment.
keyPressEvent
(QKeyEvent)¶
-
ContrastAdjustment.
keyReleaseEvent
(QKeyEvent)¶
-
ContrastAdjustment.
keyboardGrabber
() → QWidget¶
-
ContrastAdjustment.
killTimer
(int)¶
-
ContrastAdjustment.
languageChange
()¶
-
ContrastAdjustment.
layout
() → QLayout¶
-
ContrastAdjustment.
layoutDirection
() → Qt.LayoutDirection¶
-
ContrastAdjustment.
leaveEvent
(QEvent)¶
-
ContrastAdjustment.
locale
() → QLocale¶
-
ContrastAdjustment.
logicalDpiX
() → int¶
-
ContrastAdjustment.
logicalDpiY
() → int¶
-
ContrastAdjustment.
lower
()¶
-
ContrastAdjustment.
mapFrom
(QWidget, QPoint) → QPoint¶
-
ContrastAdjustment.
mapFromGlobal
(QPoint) → QPoint¶
-
ContrastAdjustment.
mapFromParent
(QPoint) → QPoint¶
-
ContrastAdjustment.
mapTo
(QWidget, QPoint) → QPoint¶
-
ContrastAdjustment.
mapToGlobal
(QPoint) → QPoint¶
-
ContrastAdjustment.
mapToParent
(QPoint) → QPoint¶
-
ContrastAdjustment.
mask
() → QRegion¶
-
ContrastAdjustment.
maximumHeight
() → int¶
-
ContrastAdjustment.
maximumSize
() → QSize¶
-
ContrastAdjustment.
maximumWidth
() → int¶
-
ContrastAdjustment.
metaObject
() → QMetaObject¶
-
ContrastAdjustment.
metric
(QPaintDevice.PaintDeviceMetric) → int¶
-
ContrastAdjustment.
minimumHeight
() → int¶
-
ContrastAdjustment.
minimumSize
() → QSize¶
-
ContrastAdjustment.
minimumSizeHint
() → QSize¶
-
ContrastAdjustment.
minimumWidth
() → int¶
-
ContrastAdjustment.
mouseDoubleClickEvent
(QMouseEvent)¶
-
ContrastAdjustment.
mouseGrabber
() → QWidget¶
-
ContrastAdjustment.
mouseMoveEvent
(QMouseEvent)¶
-
ContrastAdjustment.
mousePressEvent
(QMouseEvent)¶
-
ContrastAdjustment.
mouseReleaseEvent
(QMouseEvent)¶
-
ContrastAdjustment.
move
(QPoint)¶ QWidget.move(int, int)
-
ContrastAdjustment.
moveEvent
(QMoveEvent)¶
-
ContrastAdjustment.
moveToThread
(QThread)¶
-
ContrastAdjustment.
nativeParentWidget
() → QWidget¶
-
ContrastAdjustment.
nextInFocusChain
() → QWidget¶
-
ContrastAdjustment.
normalGeometry
() → QRect¶
-
ContrastAdjustment.
numColors
() → int¶
-
ContrastAdjustment.
objectName
() → str¶
-
ContrastAdjustment.
overrideWindowFlags
(Qt.WindowFlags)¶
-
ContrastAdjustment.
overrideWindowState
(Qt.WindowStates)¶
-
ContrastAdjustment.
paintEngine
() → QPaintEngine¶
-
ContrastAdjustment.
paintEvent
(QPaintEvent)¶
-
ContrastAdjustment.
paintingActive
() → bool¶
-
ContrastAdjustment.
palette
() → QPalette¶
-
ContrastAdjustment.
paletteChange
(QPalette)¶
-
ContrastAdjustment.
parent
() → QObject¶
-
ContrastAdjustment.
parentWidget
() → QWidget¶
-
ContrastAdjustment.
physicalDpiX
() → int¶
-
ContrastAdjustment.
physicalDpiY
() → int¶
-
ContrastAdjustment.
pos
() → QPoint¶
-
ContrastAdjustment.
previousInFocusChain
() → QWidget¶
-
ContrastAdjustment.
property
(str) → object¶
-
ContrastAdjustment.
pyqtConfigure
(...)¶ Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
-
ContrastAdjustment.
raise_
()¶
-
ContrastAdjustment.
rect
() → QRect¶
-
ContrastAdjustment.
releaseKeyboard
()¶
-
ContrastAdjustment.
releaseMouse
()¶
-
ContrastAdjustment.
releaseShortcut
(int)¶
-
ContrastAdjustment.
removeAction
(QAction)¶
-
ContrastAdjustment.
removeEventFilter
(QObject)¶
-
ContrastAdjustment.
render
(QPaintDevice, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)¶ QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
-
ContrastAdjustment.
repaint
()¶ QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
-
ContrastAdjustment.
resetInputContext
()¶
-
ContrastAdjustment.
resize
(QSize)¶ QWidget.resize(int, int)
-
ContrastAdjustment.
resizeEvent
(QResizeEvent)¶
-
ContrastAdjustment.
restoreGeometry
(QByteArray) → bool¶
-
ContrastAdjustment.
saveGeometry
() → QByteArray¶
-
ContrastAdjustment.
scroll
(int, int)¶ QWidget.scroll(int, int, QRect)
-
ContrastAdjustment.
setAcceptDrops
(bool)¶
-
ContrastAdjustment.
setAccessibleDescription
(str)¶
-
ContrastAdjustment.
setAccessibleName
(str)¶
-
ContrastAdjustment.
setAttribute
(Qt.WidgetAttribute, bool on=True)¶
-
ContrastAdjustment.
setAutoFillBackground
(bool)¶
-
ContrastAdjustment.
setBackgroundRole
(QPalette.ColorRole)¶
-
ContrastAdjustment.
setBaseSize
(int, int)¶ QWidget.setBaseSize(QSize)
-
ContrastAdjustment.
setContentsMargins
(int, int, int, int)¶ QWidget.setContentsMargins(QMargins)
-
ContrastAdjustment.
setContextMenuPolicy
(Qt.ContextMenuPolicy)¶
-
ContrastAdjustment.
setCursor
(QCursor)¶
-
ContrastAdjustment.
setDisabled
(bool)¶
-
ContrastAdjustment.
setEnabled
(bool)¶
-
ContrastAdjustment.
setFixedHeight
(int)¶
-
ContrastAdjustment.
setFixedSize
(QSize)¶ QWidget.setFixedSize(int, int)
-
ContrastAdjustment.
setFixedWidth
(int)¶
-
ContrastAdjustment.
setFocus
()¶ QWidget.setFocus(Qt.FocusReason)
-
ContrastAdjustment.
setFocusPolicy
(Qt.FocusPolicy)¶
-
ContrastAdjustment.
setFocusProxy
(QWidget)¶
-
ContrastAdjustment.
setFont
(QFont)¶
-
ContrastAdjustment.
setForegroundRole
(QPalette.ColorRole)¶
-
ContrastAdjustment.
setGeometry
(QRect)¶ QWidget.setGeometry(int, int, int, int)
-
ContrastAdjustment.
setGraphicsEffect
(QGraphicsEffect)¶
-
ContrastAdjustment.
setHidden
(bool)¶
-
ContrastAdjustment.
setInputContext
(QInputContext)¶
-
ContrastAdjustment.
setInputMethodHints
(Qt.InputMethodHints)¶
-
ContrastAdjustment.
setLayout
(QLayout)¶
-
ContrastAdjustment.
setLayoutDirection
(Qt.LayoutDirection)¶
-
ContrastAdjustment.
setLocale
(QLocale)¶
-
ContrastAdjustment.
setMask
(QBitmap)¶ QWidget.setMask(QRegion)
-
ContrastAdjustment.
setMaximumHeight
(int)¶
-
ContrastAdjustment.
setMaximumSize
(int, int)¶ QWidget.setMaximumSize(QSize)
-
ContrastAdjustment.
setMaximumWidth
(int)¶
-
ContrastAdjustment.
setMinimumHeight
(int)¶
-
ContrastAdjustment.
setMinimumSize
(int, int)¶ QWidget.setMinimumSize(QSize)
-
ContrastAdjustment.
setMinimumWidth
(int)¶
-
ContrastAdjustment.
setMouseTracking
(bool)¶
-
ContrastAdjustment.
setObjectName
(str)¶
-
ContrastAdjustment.
setPalette
(QPalette)¶
-
ContrastAdjustment.
setParent
(QWidget)¶ QWidget.setParent(QWidget, Qt.WindowFlags)
-
ContrastAdjustment.
setProperty
(str, object) → bool¶
-
ContrastAdjustment.
setShortcutAutoRepeat
(int, bool enabled=True)¶
-
ContrastAdjustment.
setShortcutEnabled
(int, bool enabled=True)¶
-
ContrastAdjustment.
setShown
(bool)¶
-
ContrastAdjustment.
setSizeIncrement
(int, int)¶ QWidget.setSizeIncrement(QSize)
-
ContrastAdjustment.
setSizePolicy
(QSizePolicy)¶ QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
-
ContrastAdjustment.
setStatusTip
(str)¶
-
ContrastAdjustment.
setStyle
(QStyle)¶
-
ContrastAdjustment.
setStyleSheet
(str)¶
-
ContrastAdjustment.
setTabOrder
(QWidget, QWidget)¶
-
ContrastAdjustment.
setToolTip
(str)¶
-
ContrastAdjustment.
setUpdatesEnabled
(bool)¶
-
ContrastAdjustment.
setVisible
(bool)¶
-
ContrastAdjustment.
setWhatsThis
(str)¶
-
ContrastAdjustment.
setWindowFilePath
(str)¶
-
ContrastAdjustment.
setWindowFlags
(Qt.WindowFlags)¶
-
ContrastAdjustment.
setWindowIcon
(QIcon)¶
-
ContrastAdjustment.
setWindowIconText
(str)¶
-
ContrastAdjustment.
setWindowModality
(Qt.WindowModality)¶
-
ContrastAdjustment.
setWindowModified
(bool)¶
-
ContrastAdjustment.
setWindowOpacity
(float)¶
-
ContrastAdjustment.
setWindowRole
(str)¶
-
ContrastAdjustment.
setWindowState
(Qt.WindowStates)¶
-
ContrastAdjustment.
setWindowTitle
(str)¶
-
ContrastAdjustment.
show
()¶
-
ContrastAdjustment.
showFullScreen
()¶
-
ContrastAdjustment.
showMaximized
()¶
-
ContrastAdjustment.
showMinimized
()¶
-
ContrastAdjustment.
showNormal
()¶
-
ContrastAdjustment.
signalsBlocked
() → bool¶
-
ContrastAdjustment.
size
() → QSize¶
-
ContrastAdjustment.
sizeHint
() → QSize¶
-
ContrastAdjustment.
sizeIncrement
() → QSize¶
-
ContrastAdjustment.
sizePolicy
() → QSizePolicy¶
-
ContrastAdjustment.
stackUnder
(QWidget)¶
-
ContrastAdjustment.
startTimer
(int) → int¶
-
ContrastAdjustment.
statusTip
() → str¶
-
ContrastAdjustment.
styleSheet
() → str¶
-
ContrastAdjustment.
tabletEvent
(QTabletEvent)¶
-
ContrastAdjustment.
testAttribute
(Qt.WidgetAttribute) → bool¶
-
ContrastAdjustment.
thread
() → QThread¶
-
ContrastAdjustment.
toolTip
() → str¶
-
ContrastAdjustment.
topLevelWidget
() → QWidget¶
-
ContrastAdjustment.
tr
(str, str disambiguation=None, int n=-1) → str¶
-
ContrastAdjustment.
trUtf8
(str, str disambiguation=None, int n=-1) → str¶
-
ContrastAdjustment.
underMouse
() → bool¶
-
ContrastAdjustment.
ungrabGesture
(Qt.GestureType)¶
-
ContrastAdjustment.
unsetCursor
()¶
-
ContrastAdjustment.
unsetLayoutDirection
()¶
-
ContrastAdjustment.
unsetLocale
()¶
-
ContrastAdjustment.
update
()¶ QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
-
ContrastAdjustment.
updateGeometry
()¶
-
ContrastAdjustment.
updateMicroFocus
()¶
-
ContrastAdjustment.
updatesEnabled
() → bool¶
-
ContrastAdjustment.
visibility_changed
(enable)¶ DockWidget visibility has changed
-
ContrastAdjustment.
visibleRegion
() → QRegion¶
-
ContrastAdjustment.
whatsThis
() → str¶
-
ContrastAdjustment.
wheelEvent
(QWheelEvent)¶
-
ContrastAdjustment.
width
() → int¶
-
ContrastAdjustment.
widthMM
() → int¶
-
ContrastAdjustment.
winEvent
(MSG) -> (bool, int)¶
-
ContrastAdjustment.
winId
() → sip.voidptr¶
-
ContrastAdjustment.
window
() → QWidget¶
-
ContrastAdjustment.
windowActivationChange
(bool)¶
-
ContrastAdjustment.
windowFilePath
() → str¶
-
ContrastAdjustment.
windowFlags
() → Qt.WindowFlags¶
-
ContrastAdjustment.
windowIcon
() → QIcon¶
-
ContrastAdjustment.
windowIconText
() → str¶
-
ContrastAdjustment.
windowModality
() → Qt.WindowModality¶
-
ContrastAdjustment.
windowOpacity
() → float¶
-
ContrastAdjustment.
windowRole
() → str¶
-
ContrastAdjustment.
windowState
() → Qt.WindowStates¶
-
ContrastAdjustment.
windowTitle
() → str¶
-
ContrastAdjustment.
windowType
() → Qt.WindowType¶
-
ContrastAdjustment.
x
() → int¶
-
ContrastAdjustment.
y
() → int¶
-
-
class
plotpy.histogram.
LevelsHistogram
(parent=None)[source]¶ Image levels histogram widget
-
SIG_VOI_CHANGED
¶ Signal emitted by LevelsHistogram when LUT range was changed
-
eliminate_outliers
(percent)[source]¶ Eliminate outliers: eliminate percent/2*N counts on each side of the histogram (where N is the total count number)
-
DEFAULT_ITEM_TYPE
¶ alias of
ICurveItemType
-
class
RenderFlags
(QWidget.RenderFlags)¶ QWidget.RenderFlags(int) QWidget.RenderFlags()
-
LevelsHistogram.
acceptDrops
() → bool¶
-
LevelsHistogram.
accessibleDescription
() → str¶
-
LevelsHistogram.
accessibleName
() → str¶
-
LevelsHistogram.
actions
() → list-of-QAction¶
-
LevelsHistogram.
activateWindow
()¶
-
LevelsHistogram.
addAction
(QAction)¶
-
LevelsHistogram.
addActions
(list-of-QAction)¶
-
LevelsHistogram.
add_item
(item, z=None)¶ Add a plot item instance to this plot widget
- item:
qwt.QwtPlotItem
object implementing theplotpy.interfaces.IBasePlotItem
interface - z: item’s z order (None -> z = max(self.get_items())+1)
- item:
-
LevelsHistogram.
add_item_with_z_offset
(item, zoffset)¶ Add a plot item instance within a specified z range, over zmin
-
LevelsHistogram.
adjustSize
()¶
-
LevelsHistogram.
attachItem
(plotItem, on)¶ Attach/Detach a plot item
Parameters: - plotItem (qwt.plot.QwtPlotItem) – Plot item
- on (bool) – When true attach the item, otherwise detach it
-
LevelsHistogram.
autoDelete
()¶ Returns: true if auto deletion is enabled See also
-
LevelsHistogram.
autoFillBackground
() → bool¶
-
LevelsHistogram.
autoRefresh
()¶ Replots the plot if
autoReplot()
is True.
-
LevelsHistogram.
autoReplot
()¶ Returns: True if the autoReplot option is set. See also
-
LevelsHistogram.
axisAutoScale
(axisId)¶ Parameters: axisId (int) – Axis index Returns: True, if autoscaling is enabled
-
LevelsHistogram.
axisEnabled
(axisId)¶ Parameters: axisId (int) – Axis index Returns: True, if a specified axis is enabled
-
LevelsHistogram.
axisFont
(axisId)¶ Parameters: axisId (int) – Axis index Returns: The font of the scale labels for a specified axis
-
LevelsHistogram.
axisInterval
(axisId)¶ Parameters: axisId (int) – Axis index Returns: The current interval of the specified axis This is only a convenience function for axisScaleDiv(axisId).interval()
See also
qwt.scale_div.QwtScaleDiv
,axisScaleDiv()
-
LevelsHistogram.
axisMaxMajor
(axisId)¶ Parameters: axisId (int) – Axis index Returns: The maximum number of major ticks for a specified axis See also
setAxisMaxMajor()
,qwt.scale_engine.QwtScaleEngine.divideScale()
-
LevelsHistogram.
axisMaxMinor
(axisId)¶ Parameters: axisId (int) – Axis index Returns: The maximum number of minor ticks for a specified axis See also
setAxisMaxMinor()
,qwt.scale_engine.QwtScaleEngine.divideScale()
-
LevelsHistogram.
axisScaleDiv
(axisId)¶ Parameters: axisId (int) – Axis index Returns: The scale division of a specified axis axisScaleDiv(axisId).lowerBound(), axisScaleDiv(axisId).upperBound() are the current limits of the axis scale.
See also
qwt.scale_div.QwtScaleDiv
,setAxisScaleDiv()
,qwt.scale_engine.QwtScaleEngine.divideScale()
-
LevelsHistogram.
axisScaleDraw
(axisId)¶ Parameters: axisId (int) – Axis index Returns: Specified scaleDraw for axis, or NULL if axis is invalid.
-
LevelsHistogram.
axisScaleEngine
(axisId)¶ Parameters: axisId (int) – Axis index Returns: Scale engine for a specific axis See also
-
LevelsHistogram.
axisStepSize
(axisId)¶ Parameters: axisId (int) – Axis index Returns: step size parameter value This doesn’t need to be the step size of the current scale.
See also
setAxisScale()
,qwt.scale_engine.QwtScaleEngine.divideScale()
-
LevelsHistogram.
axisTitle
(axisId)¶ Parameters: axisId (int) – Axis index Returns: Title of a specified axis
-
LevelsHistogram.
axisValid
(axisId)¶ Parameters: axisId (int) – Axis Returns: True if the specified axis exists, otherwise False
-
LevelsHistogram.
axisWidget
(axisId)¶ Parameters: axisId (int) – Axis index Returns: Scale widget of the specified axis, or None if axisId is invalid.
-
LevelsHistogram.
backgroundRole
() → QPalette.ColorRole¶
-
LevelsHistogram.
baseSize
() → QSize¶
-
LevelsHistogram.
blockSignals
(bool) → bool¶
-
LevelsHistogram.
canvas
()¶ Returns: the plot’s canvas
-
LevelsHistogram.
canvasBackground
()¶ Returns: Background brush of the plotting area. See also
-
LevelsHistogram.
canvasMap
(axisId)¶ Parameters: axisId (int) – Axis Returns: Map for the axis on the canvas. With this map pixel coordinates can translated to plot coordinates and vice versa. See also
qwt.scale_map.QwtScaleMap
,transform()
,invTransform()
-
LevelsHistogram.
changeEvent
(QEvent)¶
-
LevelsHistogram.
childAt
(QPoint) → QWidget¶ QWidget.childAt(int, int) -> QWidget
-
LevelsHistogram.
children
() → list-of-QObject¶
-
LevelsHistogram.
childrenRect
() → QRect¶
-
LevelsHistogram.
childrenRegion
() → QRegion¶
-
LevelsHistogram.
clearFocus
()¶
-
LevelsHistogram.
clearMask
()¶
-
LevelsHistogram.
close
() → bool¶
-
LevelsHistogram.
colorCount
() → int¶
-
LevelsHistogram.
connect
(QObject, SIGNAL(), QObject, SLOT(), Qt.ConnectionType=Qt.AutoConnection) → bool¶ QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
-
LevelsHistogram.
contentsMargins
() → QMargins¶
-
LevelsHistogram.
contentsRect
() → QRect¶
-
LevelsHistogram.
contextMenuPolicy
() → Qt.ContextMenuPolicy¶
-
LevelsHistogram.
copy_to_clipboard
()¶ Copy widget’s window to clipboard
-
LevelsHistogram.
cursor
() → QCursor¶
-
LevelsHistogram.
customContextMenuRequested
¶ QWidget.customContextMenuRequested[QPoint] [signal]
-
LevelsHistogram.
del_all_items
(except_grid=True)¶ Del all items, eventually (default) except grid
-
LevelsHistogram.
del_item
(item)¶ Remove item from widget Convenience function (see ‘del_items’)
-
LevelsHistogram.
del_items
(items)¶ Remove item from widget
-
LevelsHistogram.
deleteLater
()¶
-
LevelsHistogram.
depth
() → int¶
-
LevelsHistogram.
deserialize
(reader)¶ - Restore items from HDF5 file:
- reader:
guidata.hdf5io.HDF5Reader
object
- reader:
See also
plotpy.baseplot.BasePlot.save_items_to_hdf5()
-
LevelsHistogram.
destroyed
¶ QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
-
LevelsHistogram.
detachItems
(rtti, autoDelete)¶ Detach items from the dictionary
Parameters: - rtti (int) – In case of QwtPlotItem.Rtti_PlotItem detach all items otherwise only those items of the type rtti.
- autoDelete (bool) – If true, delete all detached items
-
LevelsHistogram.
devType
() → int¶
-
LevelsHistogram.
disable_autoscale
()¶ Re-apply the axis scales so as to disable autoscaling without changing the view
-
LevelsHistogram.
disable_unused_axes
()¶ Disable unused axes
-
LevelsHistogram.
disconnect
(QObject, SIGNAL(), QObject, SLOT()) → bool¶ QObject.disconnect(QObject, SIGNAL(), callable) -> bool
-
LevelsHistogram.
do_autoscale
(replot=True, axis_id=None)¶ Do autoscale on all axes
-
LevelsHistogram.
do_pan_view
(dx, dy)¶ Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)
-
LevelsHistogram.
do_zoom_view
(dx, dy, lock_aspect_ratio=False)¶ Change the scale of the active axes (zoom/dezoom) according to dx, dy dx, dy are tuples composed of (initial pos, dest pos) We try to keep initial pos fixed on the canvas as the scale changes
-
LevelsHistogram.
drawCanvas
(painter)¶ Redraw the canvas.
Parameters: painter (QPainter) – Painter used for drawing Warning
drawCanvas calls drawItems what is also used for printing. Applications that like to add individual plot items better overload drawItems()
See also
getCanvasMarginsHint()
,QwtPlotItem.getCanvasMarginHint()
-
LevelsHistogram.
drawFrame
(QPainter)¶
-
LevelsHistogram.
drawItems
(painter, canvasRect, maps)¶ Redraw the canvas.
Parameters: - painter (QPainter) – Painter used for drawing
- canvasRect (QRectF) – Bounding rectangle where to paint
- maps (list) – QwtPlot.axisCnt maps, mapping between plot and paint device coordinates
Note
Usually canvasRect is contentsRect() of the plot canvas. Due to a bug in Qt this rectangle might be wrong for certain frame styles ( f.e QFrame.Box ) and it might be necessary to fix the margins manually using QWidget.setContentsMargins()
-
LevelsHistogram.
dumpObjectInfo
()¶
-
LevelsHistogram.
dumpObjectTree
()¶
-
LevelsHistogram.
dynamicPropertyNames
() → list-of-QByteArray¶
-
LevelsHistogram.
edit_axis_parameters
(axis_id)¶ Edit axis parameters
-
LevelsHistogram.
edit_plot_parameters
(key)¶ Edit plot parameters
-
LevelsHistogram.
effectiveWinId
() → sip.voidptr¶
-
LevelsHistogram.
emit
(SIGNAL(), ...)¶
-
LevelsHistogram.
enableAxis
(axisId, tf=True)¶ Enable or disable a specified axis
When an axis is disabled, this only means that it is not visible on the screen. Curves, markers and can be attached to disabled axes, and transformation of screen coordinates into values works as normal.
Only xBottom and yLeft are enabled by default.
Parameters: - axisId (int) – Axis index
- tf (bool) – True (enabled) or False (disabled)
-
LevelsHistogram.
enable_used_axes
()¶ Enable only used axes For now, this is needed only by the pyplot interface
-
LevelsHistogram.
ensurePolished
()¶
-
LevelsHistogram.
exportTo
(filename, size=(800, 600), size_mm=None, resolution=72.0, format_=None)¶ Export plot to PDF or image file (SVG, PNG, ...)
Parameters: - filename (str) – Filename
- size (tuple) – (width, height) size in pixels
- size_mm (tuple) – (width, height) size in millimeters
- resolution (float) – Image resolution
- format (str) – File format (PDF, SVG, PNG, ...)
-
LevelsHistogram.
find
(sip.voidptr) → QWidget¶
-
LevelsHistogram.
findChild
(type, str name='') → QObject¶ QObject.findChild(tuple, str name=’‘) -> QObject
-
LevelsHistogram.
findChildren
(type, str name='') → list-of-QObject¶ QObject.findChildren(tuple, str name=’‘) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
-
LevelsHistogram.
focusPolicy
() → Qt.FocusPolicy¶
-
LevelsHistogram.
focusProxy
() → QWidget¶
-
LevelsHistogram.
focusWidget
() → QWidget¶
-
LevelsHistogram.
font
() → QFont¶
-
LevelsHistogram.
fontInfo
() → QFontInfo¶
-
LevelsHistogram.
fontMetrics
() → QFontMetrics¶
Returns: Text of the footer See also
Returns: Footer label widget.
-
LevelsHistogram.
foregroundRole
() → QPalette.ColorRole¶
-
LevelsHistogram.
frameGeometry
() → QRect¶
-
LevelsHistogram.
frameRect
() → QRect¶
-
LevelsHistogram.
frameShadow
() → QFrame.Shadow¶
-
LevelsHistogram.
frameShape
() → QFrame.Shape¶
-
LevelsHistogram.
frameSize
() → QSize¶
-
LevelsHistogram.
frameStyle
() → int¶
-
LevelsHistogram.
frameWidth
() → int¶
-
LevelsHistogram.
geometry
() → QRect¶
-
LevelsHistogram.
getCanvasMarginsHint
(maps, canvasRect)¶ Calculate the canvas margins
Parameters: - maps (list) – QwtPlot.axisCnt maps, mapping between plot and paint device coordinates
- canvasRect (QRectF) – Bounding rectangle where to paint
Plot items might indicate, that they need some extra space at the borders of the canvas by the QwtPlotItem.Margins flag.
See also
updateCanvasMargins()
,getCanvasMarginHint()
-
LevelsHistogram.
getContentsMargins
() -> (int, int, int, int)¶
-
LevelsHistogram.
get_active_axes
()¶ Return active axes
-
LevelsHistogram.
get_active_item
(force=False)¶ Return active item Force item activation if there is no active item
-
LevelsHistogram.
get_axesparam_class
(item)¶ Return AxesParam dataset class associated to item’s type
-
LevelsHistogram.
get_axis_color
(axis_id)¶ Get axis color (color name, i.e. string)
-
LevelsHistogram.
get_axis_direction
(axis_id)¶ Return axis direction of increasing values
- axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...) or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
-
LevelsHistogram.
get_axis_font
(axis_id)¶ Get axis font
-
LevelsHistogram.
get_axis_id
(axis_name)¶ Return axis ID from axis name If axis ID is passed directly, check the ID
-
LevelsHistogram.
get_axis_limits
(axis_id)¶ Return axis limits (minimum and maximum values)
-
LevelsHistogram.
get_axis_scale
(axis_id)¶ Return the name (‘lin’ or ‘log’) of the scale used by axis
-
LevelsHistogram.
get_axis_title
(axis_id)¶ Get axis title
-
LevelsHistogram.
get_axis_unit
(axis_id)¶ Get axis unit
Return widget context menu
-
LevelsHistogram.
get_default_item
()¶ Return default item, depending on plot’s default item type (e.g. for a curve plot, this is a curve item type).
Return nothing if there is more than one item matching the default item type.
-
LevelsHistogram.
get_items
(z_sorted=False, item_type=None)¶ Return widget’s item list (items are based on IBasePlotItem’s interface)
-
LevelsHistogram.
get_last_active_item
(item_type)¶ Return last active item corresponding to passed item_type
-
LevelsHistogram.
get_max_z
()¶ Return maximum z-order for all items registered in plot If there is no item, return 0
-
LevelsHistogram.
get_nearest_object
(pos, close_dist=0)¶ Return nearest item from position ‘pos’
If close_dist > 0:
Return the first found item (higher z) which distance to ‘pos’ is less than close_distelse:
Return the closest item
-
LevelsHistogram.
get_nearest_object_in_z
(pos)¶ Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)
-
LevelsHistogram.
get_plot_limits
(xaxis='bottom', yaxis='left')¶ Return plot scale limits
-
LevelsHistogram.
get_private_items
(z_sorted=False, item_type=None)¶ Return widget’s private item list (items are based on IBasePlotItem’s interface)
-
LevelsHistogram.
get_public_items
(z_sorted=False, item_type=None)¶ Return widget’s public item list (items are based on IBasePlotItem’s interface)
-
LevelsHistogram.
get_scales
()¶ Return active curve scales
-
LevelsHistogram.
get_selected_items
(z_sorted=False, item_type=None)¶ Return selected items
-
LevelsHistogram.
get_title
()¶ Get plot title
-
LevelsHistogram.
grabGesture
(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))¶
-
LevelsHistogram.
grabKeyboard
()¶
-
LevelsHistogram.
grabMouse
()¶ QWidget.grabMouse(QCursor)
-
LevelsHistogram.
grabShortcut
(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int¶
-
LevelsHistogram.
graphicsEffect
() → QGraphicsEffect¶
-
LevelsHistogram.
graphicsProxyWidget
() → QGraphicsProxyWidget¶
-
LevelsHistogram.
hasFocus
() → bool¶
-
LevelsHistogram.
hasMouseTracking
() → bool¶
-
LevelsHistogram.
height
() → int¶
-
LevelsHistogram.
heightForWidth
(int) → int¶
-
LevelsHistogram.
heightMM
() → int¶
-
LevelsHistogram.
hide
()¶
-
LevelsHistogram.
hide_items
(items=None, item_type=None)¶ Hide items (if items is None, hide all items)
-
LevelsHistogram.
inherits
(str) → bool¶
-
LevelsHistogram.
initAxesData
()¶ Initialize axes
-
LevelsHistogram.
inputContext
() → QInputContext¶
-
LevelsHistogram.
inputMethodHints
() → Qt.InputMethodHints¶
-
LevelsHistogram.
inputMethodQuery
(Qt.InputMethodQuery) → object¶
-
LevelsHistogram.
insertAction
(QAction, QAction)¶
-
LevelsHistogram.
insertActions
(QAction, list-of-QAction)¶
-
LevelsHistogram.
insertItem
(item)¶ Insert a plot item
Parameters: item (qwt.plot.QwtPlotItem) – PlotItem See also
-
LevelsHistogram.
insertLegend
(legend, pos=None, ratio=-1)¶ Insert a legend
If the position legend is QwtPlot.LeftLegend or QwtPlot.RightLegend the legend will be organized in one column from top to down. Otherwise the legend items will be placed in a table with a best fit number of columns from left to right.
insertLegend() will set the plot widget as parent for the legend. The legend will be deleted in the destructor of the plot or when another legend is inserted.
Legends, that are not inserted into the layout of the plot widget need to connect to the legendDataChanged() signal. Calling updateLegend() initiates this signal for an initial update. When the application code wants to implement its own layout this also needs to be done for rendering plots to a document ( see QwtPlotRenderer ).
Parameters: - legend (qwt.legend.QwtAbstractLegend) – Legend
- pos (QwtPlot.LegendPosition) – The legend’s position.
- ratio (float) – Ratio between legend and the bounding rectangle of title, canvas and axes
Note
For top/left position the number of columns will be limited to 1, otherwise it will be set to unlimited.
Note
The legend will be shrunk if it would need more space than the given ratio. The ratio is limited to ]0.0 .. 1.0]. In case of <= 0.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5.
See also
legend()
,qwt.plot_layout.QwtPlotLayout.legendPosition()
,qwt.plot_layout.QwtPlotLayout.setLegendPosition()
-
LevelsHistogram.
installEventFilter
(QObject)¶
-
LevelsHistogram.
invTransform
(axisId, pos)¶ Transform the x or y coordinate of a position in the drawing region into a value.
Parameters: - axisId (int) – Axis index
- pos (int) – position
Warning
The position can be an x or a y coordinate, depending on the specified axis.
-
LevelsHistogram.
invalidate
()¶ Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)
-
LevelsHistogram.
isActiveWindow
() → bool¶
-
LevelsHistogram.
isAncestorOf
(QWidget) → bool¶
-
LevelsHistogram.
isEnabled
() → bool¶
-
LevelsHistogram.
isEnabledTo
(QWidget) → bool¶
-
LevelsHistogram.
isEnabledToTLW
() → bool¶
-
LevelsHistogram.
isFullScreen
() → bool¶
-
LevelsHistogram.
isHidden
() → bool¶
-
LevelsHistogram.
isLeftToRight
() → bool¶
-
LevelsHistogram.
isMaximized
() → bool¶
-
LevelsHistogram.
isMinimized
() → bool¶
-
LevelsHistogram.
isModal
() → bool¶
-
LevelsHistogram.
isRightToLeft
() → bool¶
-
LevelsHistogram.
isTopLevel
() → bool¶
-
LevelsHistogram.
isVisible
() → bool¶
-
LevelsHistogram.
isVisibleTo
(QWidget) → bool¶
-
LevelsHistogram.
isWidgetType
() → bool¶
-
LevelsHistogram.
isWindow
() → bool¶
-
LevelsHistogram.
isWindowModified
() → bool¶
-
LevelsHistogram.
itemList
(rtti=None)¶ A list of attached plot items.
Use caution when iterating these lists, as removing/detaching an item will invalidate the iterator. Instead you can place pointers to objects to be removed in a removal list, and traverse that list later.
Parameters: rtti (int) – In case of QwtPlotItem.Rtti_PlotItem detach all items otherwise only those items of the type rtti. Returns: List of all attached plot items of a specific type. If rtti is None, return a list of all attached plot items.
-
LevelsHistogram.
keyboardGrabber
() → QWidget¶
-
LevelsHistogram.
killTimer
(int)¶
-
LevelsHistogram.
layout
() → QLayout¶
-
LevelsHistogram.
layoutDirection
() → Qt.LayoutDirection¶
-
LevelsHistogram.
legend
()¶ Returns: the plot’s legend See also
-
LevelsHistogram.
lineWidth
() → int¶
-
LevelsHistogram.
locale
() → QLocale¶
-
LevelsHistogram.
logicalDpiX
() → int¶
-
LevelsHistogram.
logicalDpiY
() → int¶
-
LevelsHistogram.
lower
()¶
-
LevelsHistogram.
mapFrom
(QWidget, QPoint) → QPoint¶
-
LevelsHistogram.
mapFromGlobal
(QPoint) → QPoint¶
-
LevelsHistogram.
mapFromParent
(QPoint) → QPoint¶
-
LevelsHistogram.
mapTo
(QWidget, QPoint) → QPoint¶
-
LevelsHistogram.
mapToGlobal
(QPoint) → QPoint¶
-
LevelsHistogram.
mapToParent
(QPoint) → QPoint¶
-
LevelsHistogram.
mask
() → QRegion¶
-
LevelsHistogram.
maximumHeight
() → int¶
-
LevelsHistogram.
maximumSize
() → QSize¶
-
LevelsHistogram.
maximumWidth
() → int¶
-
LevelsHistogram.
metaObject
() → QMetaObject¶
-
LevelsHistogram.
midLineWidth
() → int¶
-
LevelsHistogram.
minimumHeight
() → int¶
-
LevelsHistogram.
minimumSize
() → QSize¶
-
LevelsHistogram.
minimumSizeHint
()¶ Returns: Return a minimum size hint
-
LevelsHistogram.
minimumWidth
() → int¶
-
LevelsHistogram.
mouseDoubleClickEvent
(event)¶ Reimplement QWidget method
-
LevelsHistogram.
mouseGrabber
() → QWidget¶
-
LevelsHistogram.
move
(QPoint)¶ QWidget.move(int, int)
-
LevelsHistogram.
moveToThread
(QThread)¶
-
LevelsHistogram.
move_down
(item_list)¶ Move item(s) down, i.e. to the background (swap item with the previous item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
-
LevelsHistogram.
move_up
(item_list)¶ Move item(s) up, i.e. to the foreground (swap item with the next item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
-
LevelsHistogram.
nativeParentWidget
() → QWidget¶
-
LevelsHistogram.
nextInFocusChain
() → QWidget¶
-
LevelsHistogram.
normalGeometry
() → QRect¶
-
LevelsHistogram.
numColors
() → int¶
-
LevelsHistogram.
objectName
() → str¶
-
LevelsHistogram.
overrideWindowFlags
(Qt.WindowFlags)¶
-
LevelsHistogram.
overrideWindowState
(Qt.WindowStates)¶
-
LevelsHistogram.
paintEngine
() → QPaintEngine¶
-
LevelsHistogram.
paintEvent
(QPaintEvent)¶
-
LevelsHistogram.
paintingActive
() → bool¶
-
LevelsHistogram.
palette
() → QPalette¶
-
LevelsHistogram.
parent
() → QObject¶
-
LevelsHistogram.
parentWidget
() → QWidget¶
-
LevelsHistogram.
physicalDpiX
() → int¶
-
LevelsHistogram.
physicalDpiY
() → int¶
-
LevelsHistogram.
plotLayout
()¶ Returns: the plot’s layout See also
-
LevelsHistogram.
pos
() → QPoint¶
-
LevelsHistogram.
previousInFocusChain
() → QWidget¶
-
LevelsHistogram.
print_
(printer)¶ Print plot to printer
Parameters: printer (QPaintDevice or QPrinter or QSvgGenerator) – Printer
-
LevelsHistogram.
property
(str) → object¶
-
LevelsHistogram.
pyqtConfigure
(...)¶ Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
-
LevelsHistogram.
raise_
()¶
-
LevelsHistogram.
read_axes_styles
(section, options)¶ Read axes styles from section and options (one option for each axis in the order left, right, bottom, top)
Skip axis if option is None
-
LevelsHistogram.
rect
() → QRect¶
-
LevelsHistogram.
releaseKeyboard
()¶
-
LevelsHistogram.
releaseMouse
()¶
-
LevelsHistogram.
releaseShortcut
(int)¶
-
LevelsHistogram.
removeAction
(QAction)¶
-
LevelsHistogram.
removeEventFilter
(QObject)¶
-
LevelsHistogram.
removeItem
(item)¶ Remove a plot item
Parameters: item (qwt.plot.QwtPlotItem) – PlotItem See also
-
LevelsHistogram.
render
(QPaintDevice, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)¶ QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
-
LevelsHistogram.
repaint
()¶ QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
-
LevelsHistogram.
replot
()¶ Redraw the plot
If the autoReplot option is not set (which is the default) or if any curves are attached to raw data, the plot has to be refreshed explicitly in order to make changes visible.
See also
-
LevelsHistogram.
resize
(QSize)¶ QWidget.resize(int, int)
-
LevelsHistogram.
restoreGeometry
(QByteArray) → bool¶
-
LevelsHistogram.
restore_items
(iofile)¶ - Restore items from file using the
pickle
protocol - iofile: file object or filename
- Restore items from file using the
-
LevelsHistogram.
saveGeometry
() → QByteArray¶
-
LevelsHistogram.
save_items
(iofile, selected=False)¶ - Save (serializable) items to file using the
pickle
protocol - iofile: file object or filename
- selected=False: if True, will save only selected items
- Save (serializable) items to file using the
-
LevelsHistogram.
save_widget
(fname)¶ Grab widget’s window and save it to filename (*.png, *.pdf)
-
LevelsHistogram.
scroll
(int, int)¶ QWidget.scroll(int, int, QRect)
-
LevelsHistogram.
select_all
()¶ Select all selectable items
-
LevelsHistogram.
select_item
(item)¶ Select item
-
LevelsHistogram.
select_some_items
(items)¶ Select items
-
LevelsHistogram.
serialize
(writer, selected=False)¶ - Save (serializable) items to HDF5 file:
- writer:
guidata.hdf5io.HDF5Writer
object - selected=False: if True, will save only selected items
- writer:
See also
plotpy.baseplot.BasePlot.restore_items_from_hdf5()
-
LevelsHistogram.
setAcceptDrops
(bool)¶
-
LevelsHistogram.
setAccessibleDescription
(str)¶
-
LevelsHistogram.
setAccessibleName
(str)¶
-
LevelsHistogram.
setAttribute
(Qt.WidgetAttribute, bool on=True)¶
-
LevelsHistogram.
setAutoDelete
(autoDelete)¶ En/Disable Auto deletion
If Auto deletion is on all attached plot items will be deleted in the destructor of QwtPlotDict. The default value is on.
Parameters: autoDelete (bool) – enable/disable See also
-
LevelsHistogram.
setAutoFillBackground
(bool)¶
-
LevelsHistogram.
setAutoReplot
(tf=True)¶ Set or reset the autoReplot option
If the autoReplot option is set, the plot will be updated implicitly by manipulating member functions. Since this may be time-consuming, it is recommended to leave this option switched off and call
replot()
explicitly if necessary.The autoReplot option is set to false by default, which means that the user has to call
replot()
in order to make changes visible.Parameters: tf (bool) – True or False. Defaults to True. See also
-
LevelsHistogram.
setAxisAutoScale
(axisId, on=True)¶ Enable autoscaling for a specified axis
This member function is used to switch back to autoscaling mode after a fixed scale has been set. Autoscaling is enabled by default.
Parameters: - axisId (int) – Axis index
- on (bool) – On/Off
See also
Note
The autoscaling flag has no effect until updateAxes() is executed ( called by replot() ).
-
LevelsHistogram.
setAxisFont
(axisId, font)¶ Change the font of an axis
Parameters: - axisId (int) – Axis index
- font (QFont) – Font
Warning
This function changes the font of the tick labels, not of the axis title.
-
LevelsHistogram.
setAxisLabelAlignment
(axisId, alignment)¶ Change the alignment of the tick labels
Parameters: - axisId (int) – Axis index
- alignment (Qt.Alignment) – Or’d Qt.AlignmentFlags
See also
qwt.scale_draw.QwtScaleDraw.setLabelAlignment()
-
LevelsHistogram.
setAxisLabelAutoSize
(axisId, state)¶ Set tick labels automatic size option (default: on)
Parameters: - axisId (int) – Axis index
- state (bool) – On/off
See also
qwt.scale_draw.QwtScaleDraw.setLabelAutoSize()
-
LevelsHistogram.
setAxisLabelRotation
(axisId, rotation)¶ Rotate all tick labels
Parameters: - axisId (int) – Axis index
- rotation (float) – Angle in degrees. When changing the label rotation, the label alignment might be adjusted too.
See also
setLabelRotation()
,setAxisLabelAlignment()
-
LevelsHistogram.
setAxisMaxMajor
(axisId, maxMajor)¶ Set the maximum number of major scale intervals for a specified axis
Parameters: - axisId (int) – Axis index
- maxMajor (int) – Maximum number of major steps
See also
-
LevelsHistogram.
setAxisMaxMinor
(axisId, maxMinor)¶ Set the maximum number of minor scale intervals for a specified axis
Parameters: - axisId (int) – Axis index
- maxMinor (int) – Maximum number of minor steps
See also
-
LevelsHistogram.
setAxisScale
(axisId, min_, max_, stepSize=0)¶ Disable autoscaling and specify a fixed scale for a selected axis.
In updateAxes() the scale engine calculates a scale division from the specified parameters, that will be assigned to the scale widget. So updates of the scale widget usually happen delayed with the next replot.
Parameters: - axisId (int) – Axis index
- min (float) – Minimum of the scale
- max (float) – Maximum of the scale
- stepSize (float) – Major step size. If <code>step == 0</code>, the step size is calculated automatically using the maxMajor setting.
See also
setAxisMaxMajor()
,setAxisAutoScale()
,axisStepSize()
,qwt.scale_engine.QwtScaleEngine.divideScale()
-
LevelsHistogram.
setAxisScaleDiv
(axisId, scaleDiv)¶ Disable autoscaling and specify a fixed scale for a selected axis.
The scale division will be stored locally only until the next call of updateAxes(). So updates of the scale widget usually happen delayed with the next replot.
Parameters: - axisId (int) – Axis index
- scaleDiv (qwt.scale_div.QwtScaleDiv) – Scale division
See also
-
LevelsHistogram.
setAxisScaleDraw
(axisId, scaleDraw)¶ Set a scale draw
Parameters: - axisId (int) – Axis index
- scaleDraw (qwt.scale_draw.QwtScaleDraw) – Object responsible for drawing scales.
By passing scaleDraw it is possible to extend QwtScaleDraw functionality and let it take place in QwtPlot. Please note that scaleDraw has to be created with new and will be deleted by the corresponding QwtScale member ( like a child object ).
See also
qwt.scale_draw.QwtScaleDraw
,qwt.scale_widget.QwtScaleWigdet
Warning
The attributes of scaleDraw will be overwritten by those of the previous QwtScaleDraw.
-
LevelsHistogram.
setAxisScaleEngine
(axisId, scaleEngine)¶ Change the scale engine for an axis
Parameters: - axisId (int) – Axis index
- scaleEngine (qwt.scale_engine.QwtScaleEngine) – Scale engine
See also
-
LevelsHistogram.
setAxisTitle
(axisId, title)¶ Change the title of a specified axis
Parameters: - axisId (int) – Axis index
- title (qwt.text.QwtText or str) – axis title
-
LevelsHistogram.
setBackgroundRole
(QPalette.ColorRole)¶
-
LevelsHistogram.
setBaseSize
(int, int)¶ QWidget.setBaseSize(QSize)
-
LevelsHistogram.
setCanvas
(canvas)¶ Set the drawing canvas of the plot widget.
The default canvas is a QwtPlotCanvas.
Parameters: canvas (QWidget) – Canvas Widget See also
-
LevelsHistogram.
setCanvasBackground
(brush)¶ Change the background of the plotting area
Sets brush to QPalette.Window of all color groups of the palette of the canvas. Using canvas().setPalette() is a more powerful way to set these colors.
Parameters: brush (QBrush) – New background brush See also
-
LevelsHistogram.
setContentsMargins
(int, int, int, int)¶ QWidget.setContentsMargins(QMargins)
-
LevelsHistogram.
setContextMenuPolicy
(Qt.ContextMenuPolicy)¶
-
LevelsHistogram.
setCursor
(QCursor)¶
-
LevelsHistogram.
setDisabled
(bool)¶
-
LevelsHistogram.
setEnabled
(bool)¶
-
LevelsHistogram.
setFixedHeight
(int)¶
-
LevelsHistogram.
setFixedSize
(QSize)¶ QWidget.setFixedSize(int, int)
-
LevelsHistogram.
setFixedWidth
(int)¶
-
LevelsHistogram.
setFocus
()¶ QWidget.setFocus(Qt.FocusReason)
-
LevelsHistogram.
setFocusPolicy
(Qt.FocusPolicy)¶
-
LevelsHistogram.
setFocusProxy
(QWidget)¶
-
LevelsHistogram.
setFont
(QFont)¶
Change the text the footer
Parameters: text (str or qwt.text.QwtText) – New text of the footer See also
-
LevelsHistogram.
setForegroundRole
(QPalette.ColorRole)¶
-
LevelsHistogram.
setFrameRect
(QRect)¶
-
LevelsHistogram.
setFrameShadow
(QFrame.Shadow)¶
-
LevelsHistogram.
setFrameShape
(QFrame.Shape)¶
-
LevelsHistogram.
setFrameStyle
(int)¶
-
LevelsHistogram.
setGeometry
(QRect)¶ QWidget.setGeometry(int, int, int, int)
-
LevelsHistogram.
setGraphicsEffect
(QGraphicsEffect)¶
-
LevelsHistogram.
setHidden
(bool)¶
-
LevelsHistogram.
setInputContext
(QInputContext)¶
-
LevelsHistogram.
setInputMethodHints
(Qt.InputMethodHints)¶
-
LevelsHistogram.
setLayout
(QLayout)¶
-
LevelsHistogram.
setLayoutDirection
(Qt.LayoutDirection)¶
-
LevelsHistogram.
setLineWidth
(int)¶
-
LevelsHistogram.
setLocale
(QLocale)¶
-
LevelsHistogram.
setMask
(QBitmap)¶ QWidget.setMask(QRegion)
-
LevelsHistogram.
setMaximumHeight
(int)¶
-
LevelsHistogram.
setMaximumSize
(int, int)¶ QWidget.setMaximumSize(QSize)
-
LevelsHistogram.
setMaximumWidth
(int)¶
-
LevelsHistogram.
setMidLineWidth
(int)¶
-
LevelsHistogram.
setMinimumHeight
(int)¶
-
LevelsHistogram.
setMinimumSize
(int, int)¶ QWidget.setMinimumSize(QSize)
-
LevelsHistogram.
setMinimumWidth
(int)¶
-
LevelsHistogram.
setMouseTracking
(bool)¶
-
LevelsHistogram.
setObjectName
(str)¶
-
LevelsHistogram.
setPalette
(QPalette)¶
-
LevelsHistogram.
setParent
(QWidget)¶ QWidget.setParent(QWidget, Qt.WindowFlags)
-
LevelsHistogram.
setPlotLayout
(layout)¶ Assign a new plot layout
Parameters: layout (qwt.plot_layout.QwtPlotLayout) – Layout See also
-
LevelsHistogram.
setProperty
(str, object) → bool¶
-
LevelsHistogram.
setShortcutAutoRepeat
(int, bool enabled=True)¶
-
LevelsHistogram.
setShortcutEnabled
(int, bool enabled=True)¶
-
LevelsHistogram.
setShown
(bool)¶
-
LevelsHistogram.
setSizeIncrement
(int, int)¶ QWidget.setSizeIncrement(QSize)
-
LevelsHistogram.
setSizePolicy
(QSizePolicy)¶ QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
-
LevelsHistogram.
setStatusTip
(str)¶
-
LevelsHistogram.
setStyle
(QStyle)¶
-
LevelsHistogram.
setStyleSheet
(str)¶
-
LevelsHistogram.
setTabOrder
(QWidget, QWidget)¶
-
LevelsHistogram.
setTitle
(title)¶ Change the plot’s title
Parameters: title (str or qwt.text.QwtText) – New title See also
-
LevelsHistogram.
setToolTip
(str)¶
-
LevelsHistogram.
setUpdatesEnabled
(bool)¶
-
LevelsHistogram.
setVisible
(bool)¶
-
LevelsHistogram.
setWhatsThis
(str)¶
-
LevelsHistogram.
setWindowFilePath
(str)¶
-
LevelsHistogram.
setWindowFlags
(Qt.WindowFlags)¶
-
LevelsHistogram.
setWindowIcon
(QIcon)¶
-
LevelsHistogram.
setWindowIconText
(str)¶
-
LevelsHistogram.
setWindowModality
(Qt.WindowModality)¶
-
LevelsHistogram.
setWindowModified
(bool)¶
-
LevelsHistogram.
setWindowOpacity
(float)¶
-
LevelsHistogram.
setWindowRole
(str)¶
-
LevelsHistogram.
setWindowState
(Qt.WindowStates)¶
-
LevelsHistogram.
setWindowTitle
(str)¶
-
LevelsHistogram.
set_active_item
(item)¶ Override base set_active_item to change the grid’s axes according to the selected item
-
LevelsHistogram.
set_antialiasing
(checked)¶ Toggle curve antialiasing
-
LevelsHistogram.
set_axis_color
(axis_id, color)¶ Set axis color color: color name (string) or QColor instance
-
LevelsHistogram.
set_axis_direction
(axis_id, reverse=False)¶ Set axis direction of increasing values
axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...) or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
- reverse: False (default)
- x-axis values increase from left to right
- y-axis values increase from bottom to top
- reverse: True
- x-axis values increase from right to left
- y-axis values increase from top to bottom
-
LevelsHistogram.
set_axis_font
(axis_id, font)¶ Set axis font
-
LevelsHistogram.
set_axis_limits
(axis_id, vmin, vmax, stepsize=0)¶ Set axis limits (minimum and maximum values)
-
LevelsHistogram.
set_axis_scale
(axis_id, scale, autoscale=True)¶ Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)
-
LevelsHistogram.
set_axis_ticks
(axis_id, nmajor=None, nminor=None)¶ Set axis maximum number of major ticks and maximum of minor ticks
-
LevelsHistogram.
set_axis_title
(axis_id, text)¶ Set axis title
-
LevelsHistogram.
set_axis_unit
(axis_id, text)¶ Set axis unit
-
LevelsHistogram.
set_item_visible
(item, state, notify=True, replot=True)¶ Show/hide item and emit a SIG_ITEMS_CHANGED signal
-
LevelsHistogram.
set_items
(*args)¶ Utility function used to quickly setup a plot with a set of items
-
LevelsHistogram.
set_items_readonly
(state)¶ Set all items readonly state to state Default item’s readonly state: False (items may be deleted)
-
LevelsHistogram.
set_manager
(manager, plot_id)¶ Set the associated
plotpy.plot.PlotManager
instance
-
LevelsHistogram.
set_plot_limits
(x0, x1, y0, y1, xaxis='bottom', yaxis='left')¶ Set plot scale limits
-
LevelsHistogram.
set_pointer
(pointer_type)¶ Set pointer.
Valid values of pointer_type:
- None: disable pointer
- “canvas”: enable canvas pointer
- “curve”: enable on-curve pointer
-
LevelsHistogram.
set_scales
(xscale, yscale)¶ Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)
-
LevelsHistogram.
set_title
(title)¶ Set plot title
-
LevelsHistogram.
set_titles
(title=None, xlabel=None, ylabel=None, xunit=None, yunit=None)¶ Set plot and axes titles at once
- title: plot title
- xlabel: (bottom axis title, top axis title) or bottom axis title only
- ylabel: (left axis title, right axis title) or left axis title only
- xunit: (bottom axis unit, top axis unit) or bottom axis unit only
- yunit: (left axis unit, right axis unit) or left axis unit only
-
LevelsHistogram.
show
()¶
-
LevelsHistogram.
showEvent
(event)¶ Reimplement Qwt method
-
LevelsHistogram.
showFullScreen
()¶
-
LevelsHistogram.
showMaximized
()¶
-
LevelsHistogram.
showMinimized
()¶
-
LevelsHistogram.
showNormal
()¶
-
LevelsHistogram.
show_items
(items=None, item_type=None)¶ Show items (if items is None, show all items)
-
LevelsHistogram.
signalsBlocked
() → bool¶
-
LevelsHistogram.
size
() → QSize¶
-
LevelsHistogram.
sizeHint
()¶ Preferred size
-
LevelsHistogram.
sizeIncrement
() → QSize¶
-
LevelsHistogram.
sizePolicy
() → QSizePolicy¶
-
LevelsHistogram.
stackUnder
(QWidget)¶
-
LevelsHistogram.
startTimer
(int) → int¶
-
LevelsHistogram.
statusTip
() → str¶
-
LevelsHistogram.
style
() → QStyle¶
-
LevelsHistogram.
styleSheet
() → str¶
-
LevelsHistogram.
testAttribute
(Qt.WidgetAttribute) → bool¶
-
LevelsHistogram.
thread
() → QThread¶
-
LevelsHistogram.
title
()¶ Returns: Title of the plot See also
-
LevelsHistogram.
titleLabel
()¶ Returns: Title label widget.
-
LevelsHistogram.
toolTip
() → str¶
-
LevelsHistogram.
topLevelWidget
() → QWidget¶
-
LevelsHistogram.
tr
(str, str disambiguation=None, int n=-1) → str¶
-
LevelsHistogram.
trUtf8
(str, str disambiguation=None, int n=-1) → str¶
-
LevelsHistogram.
transform
(axisId, value)¶ Transform a value into a coordinate in the plotting region
Parameters: - axisId (int) – Axis index
- value (fload) – Value
Returns: X or Y coordinate in the plotting region corresponding to the value.
-
LevelsHistogram.
underMouse
() → bool¶
-
LevelsHistogram.
ungrabGesture
(Qt.GestureType)¶
-
LevelsHistogram.
unselect_all
()¶ Unselect all selected items
-
LevelsHistogram.
unselect_item
(item)¶ Unselect item
-
LevelsHistogram.
unsetCursor
()¶
-
LevelsHistogram.
unsetLayoutDirection
()¶
-
LevelsHistogram.
unsetLocale
()¶
-
LevelsHistogram.
update
()¶ QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
-
LevelsHistogram.
updateAxes
()¶ Rebuild the axes scales
In case of autoscaling the boundaries of a scale are calculated from the bounding rectangles of all plot items, having the QwtPlotItem.AutoScale flag enabled (QwtScaleEngine.autoScale()). Then a scale division is calculated (QwtScaleEngine.didvideScale()) and assigned to scale widget.
When the scale boundaries have been assigned with setAxisScale() a scale division is calculated (QwtScaleEngine.didvideScale()) for this interval and assigned to the scale widget.
When the scale has been set explicitly by setAxisScaleDiv() the locally stored scale division gets assigned to the scale widget.
The scale widget indicates modifications by emitting a QwtScaleWidget.scaleDivChanged() signal.
updateAxes() is usually called by replot().
See also
setAxisAutoScale()
,setAxisScale()
,setAxisScaleDiv()
,replot()
,QwtPlotItem.boundingRect()
-
LevelsHistogram.
updateCanvasMargins
()¶ Update the canvas margins
Plot items might indicate, that they need some extra space at the borders of the canvas by the QwtPlotItem.Margins flag.
See also
getCanvasMarginsHint()
,QwtPlotItem.getCanvasMarginHint()
-
LevelsHistogram.
updateGeometry
()¶
-
LevelsHistogram.
updateLayout
()¶ Adjust plot content to its current size.
See also
resizeEvent()
-
LevelsHistogram.
updateLegend
(plotItem=None)¶ If plotItem is None, emit QwtPlot.legendDataChanged for all plot item. Otherwise, emit the signal for passed plot item.
Parameters: plotItem (qwt.plot.QwtPlotItem) – Plot item See also
QwtPlotItem.legendData()
,QwtPlot.legendDataChanged
-
LevelsHistogram.
updateLegendItems
(plotItem, legendData)¶ Update all plot items interested in legend attributes
Call QwtPlotItem.updateLegend(), when the QwtPlotItem.LegendInterest flag is set.
Parameters: - plotItem (qwt.plot.QwtPlotItem) – Plot item
- legendData (list) – Entries to be displayed for the plot item ( usually 1 )
See also
QwtPlotItem.LegendInterest()
,QwtPlotItem.updateLegend()
-
LevelsHistogram.
update_all_axes_styles
()¶ Update all axes styles
-
LevelsHistogram.
update_axis_style
(axis_id)¶ Update axis style
-
LevelsHistogram.
updatesEnabled
() → bool¶
-
LevelsHistogram.
visibleRegion
() → QRegion¶
-
LevelsHistogram.
whatsThis
() → str¶
-
LevelsHistogram.
width
() → int¶
-
LevelsHistogram.
widthMM
() → int¶
-
LevelsHistogram.
winId
() → sip.voidptr¶
-
LevelsHistogram.
window
() → QWidget¶
-
LevelsHistogram.
windowFilePath
() → str¶
-
LevelsHistogram.
windowFlags
() → Qt.WindowFlags¶
-
LevelsHistogram.
windowIcon
() → QIcon¶
-
LevelsHistogram.
windowIconText
() → str¶
-
LevelsHistogram.
windowModality
() → Qt.WindowModality¶
-
LevelsHistogram.
windowOpacity
() → float¶
-
LevelsHistogram.
windowRole
() → str¶
-
LevelsHistogram.
windowState
() → Qt.WindowStates¶
-
LevelsHistogram.
windowTitle
() → str¶
-
LevelsHistogram.
windowType
() → Qt.WindowType¶
-
LevelsHistogram.
x
() → int¶
-
LevelsHistogram.
y
() → int¶
-