guiqwt.baseplot

The baseplot module provides the guiqwt plotting widget base class: guiqwt.baseplot.BasePlot. This is an enhanced version of PythonQwt’s QwtPlot plotting widget which supports the following features:

  • add to plot, del from plot, hide/show and save/restore plot items easily

  • item selection and multiple selection

  • active item

  • plot parameters editing

Warning

guiqwt.baseplot.BasePlot is rather an internal class than a ready-to-use plotting widget. The end user should prefer using guiqwt.plot.CurvePlot or guiqwt.plot.ImagePlot.

See also

Module guiqwt.curve

Module providing curve-related plot items and plotting widgets

Module guiqwt.image

Module providing image-related plot items and plotting widgets

Module guiqwt.plot

Module providing ready-to-use curve and image plotting widgets and dialog boxes

Reference

class guiqwt.baseplot.BasePlot(parent=None, section='plot')[source]

An enhanced QwtPlot class that provides methods for handling plotitems and axes better

It distinguishes activatable items from basic QwtPlotItems.

Activatable items must support IBasePlotItem interface and should be added to the plot using add_item methods.

SIG_ITEM_MOVED

Signal emitted by plot when an IBasePlotItem object was moved (args: x0, y0, x1, y1)

SIG_ITEM_HANDLE_MOVED

Signal emitted by plot when an IBasePlotItem handle was moved

SIG_MARKER_CHANGED

Signal emitted by plot when a shapes.Marker position changes

SIG_AXES_CHANGED

Signal emitted by plot when a shapes.Axes position (or the angle) changes

SIG_ANNOTATION_CHANGED

Signal emitted by plot when an annotation.AnnotatedShape position changes

SIG_RANGE_CHANGED

Signal emitted by plot when the a shapes.XRangeSelection range changes

SIG_ITEMS_CHANGED

Signal emitted by plot when item list has changed (item removed, added, …)

SIG_ACTIVE_ITEM_CHANGED

Signal emitted by plot when selected item has changed

SIG_ITEM_REMOVED

Signal emitted by plot when an item was deleted from the item list or using the delete item tool

SIG_ITEM_SELECTION_CHANGED

Signal emitted by plot when an item is selected

SIG_PLOT_LABELS_CHANGED

Signal emitted by plot when plot’s title or any axis label has changed

SIG_AXIS_DIRECTION_CHANGED

Signal emitted by plot when any plot axis direction has changed

SIG_LUT_CHANGED

Signal emitted by plot when LUT has been changed by the user

SIG_MASK_CHANGED

Signal emitted by plot when image mask has changed

SIG_CS_CURVE_CHANGED

Signal emitted by cross section plot when cross section curve data has changed

mouseDoubleClickEvent(event)[source]

Reimplement QWidget method

showEvent(event)[source]

Reimplement Qwt method

set_manager(manager, plot_id)[source]

Set the associated guiqwt.plot.PlotManager instance

sizeHint()[source]

Preferred size

get_title()[source]

Get plot title

set_title(title)[source]

Set plot title

get_axis_id(axis_name)[source]

Return axis ID from axis name If axis ID is passed directly, check the ID

read_axes_styles(section, options)[source]

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

get_axis_title(axis_id)[source]

Get axis title

set_axis_title(axis_id, text)[source]

Set axis title

get_axis_unit(axis_id)[source]

Get axis unit

set_axis_unit(axis_id, text)[source]

Set axis unit

get_axis_font(axis_id)[source]

Get axis font

set_axis_font(axis_id, font)[source]

Set axis font

get_axis_color(axis_id)[source]

Get axis color (color name, i.e. string)

set_axis_color(axis_id, color)[source]

Set axis color color: color name (string) or QColor instance

update_axis_style(axis_id)[source]

Update axis style

update_all_axes_styles()[source]

Update all axes styles

get_axis_limits(axis_id)[source]

Return axis limits (minimum and maximum values)

set_axis_limits(axis_id, vmin, vmax, stepsize=0)[source]

Set axis limits (minimum and maximum values) and optional step size

set_axis_ticks(axis_id, nmajor=None, nminor=None)[source]

Set axis maximum number of major ticks and maximum of minor ticks

get_axis_scale(axis_id)[source]

Return the name (‘lin’ or ‘log’) of the scale used by axis

set_axis_scale(axis_id, scale, autoscale=True)[source]

Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)

get_scales()[source]

Return active curve scales

set_scales(xscale, yscale)[source]

Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)

enable_used_axes()[source]

Enable only used axes For now, this is needed only by the pyplot interface

disable_unused_axes()[source]

Disable unused axes

get_items(z_sorted=False, item_type=None)[source]

Return widget’s item list (items are based on IBasePlotItem’s interface)

get_public_items(z_sorted=False, item_type=None)[source]

Return widget’s public item list (items are based on IBasePlotItem’s interface)

get_private_items(z_sorted=False, item_type=None)[source]

Return widget’s private item list (items are based on IBasePlotItem’s interface)

copy_to_clipboard()[source]

Copy widget’s window to clipboard

save_widget(fname)[source]

Grab widget’s window and save it to filename (*.png, *.pdf)

get_selected_items(z_sorted=False, item_type=None)[source]

Return selected items

get_max_z()[source]

Return maximum z-order for all items registered in plot If there is no item, return 0

add_item(item, z=None)[source]

Add a plot item instance to this plot widget

item: qwt.QwtPlotItem object implementing

the IBasePlotItem interface (guiqwt.interfaces)

add_item_with_z_offset(item, zoffset)[source]

Add a plot item instance within a specified z range, over zmin

del_items(items)[source]

Remove item from widget

del_item(item)[source]

Remove item from widget Convenience function (see ‘del_items’)

set_item_visible(item, state, notify=True, replot=True)[source]

Show/hide item and emit a SIG_ITEMS_CHANGED signal

show_items(items=None, item_type=None)[source]

Show items (if items is None, show all items)

hide_items(items=None, item_type=None)[source]

Hide items (if items is None, hide all items)

save_items(iofile, selected=False)[source]
Save (serializable) items to file using the pickle protocol
  • iofile: file object or filename

  • selected=False: if True, will save only selected items

See also guiqwt.baseplot.BasePlot.restore_items()

restore_items(iofile)[source]
Restore items from file using the pickle protocol
  • iofile: file object or filename

See also guiqwt.baseplot.BasePlot.save_items()

serialize(writer, selected=False)[source]
Save (serializable) items to HDF5 file:
  • writer: guidata.dataset.io.HDF5Writer object

  • selected=False: if True, will save only selected items

See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()

deserialize(reader)[source]
Restore items from HDF5 file:
  • reader: guidata.dataset.io.HDF5Reader object

See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()

set_items(*args)[source]

Utility function used to quickly setup a plot with a set of items

del_all_items()[source]

Remove (detach) all attached items

move_up(item_list)[source]

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

move_down(item_list)[source]

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

set_items_readonly(state)[source]

Set all items readonly state to state Default item’s readonly state: False (items may be deleted)

select_item(item)[source]

Select item

unselect_item(item)[source]

Unselect item

get_last_active_item(item_type)[source]

Return last active item corresponding to passed item_type

select_all()[source]

Select all selectable items

unselect_all()[source]

Unselect all selected items

select_some_items(items)[source]

Select items

set_active_item(item)[source]

Set active item, and unselect the old active item

get_active_axes()[source]

Return active axes

get_active_item(force=False)[source]

Return active item Force item activation if there is no active item

get_nearest_object(pos, close_dist=0)[source]

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_dist

else:

Return the closest item

get_nearest_object_in_z(pos)[source]

Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)

get_context_menu()[source]

Return widget context menu

get_axesparam_class(item)[source]

Return AxesParam dataset class associated to item’s type

get_plot_parameters(key, itemparams)[source]

Return a list of DataSets for a given parameter key the datasets will be edited and passed back to set_plot_parameters

this is a generic interface to help building context menus using the BasePlotMenuTool

set_item_parameters(itemparams)[source]

Set item (plot, here) parameters

edit_plot_parameters(key)[source]

Edit plot parameters

edit_axis_parameters(axis_id)[source]

Edit axis parameters

do_autoscale(replot=True, axis_id=None)[source]

Do autoscale on all axes

disable_autoscale()[source]

Re-apply the axis scales so as to disable autoscaling without changing the view

invalidate()[source]

Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)

class PaintDeviceMetric(*values)
class RenderFlag(*values)
class Shadow(*values)
conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class Shape(*values)
conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

classmethod from_bytes(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

class StyleMask(*values)
classmethod acceptDrops(self) bool
classmethod accessibleDescription(self) str
classmethod accessibleIdentifier(self) str
classmethod accessibleName(self) str
classmethod actionEvent(self, a0: QActionEvent | None)
classmethod actions(self) list[QAction]
classmethod activateWindow(self)
classmethod addAction(self, icon: QIcon, text: str | None) QAction | None
classmethod addAction(self, icon: QIcon, text: str | None, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
classmethod addAction(self, icon: QIcon, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int) QAction | None
classmethod addAction(self, icon: QIcon, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
classmethod addAction(self, text: str | None) QAction | None
classmethod addAction(self, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int) QAction | None
classmethod addAction(self, text: str | None, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
classmethod addAction(self, text: str | None, shortcut: QKeySequence | QKeySequence.StandardKey | str | None | int, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection) QAction | None
classmethod addAction(self, action: QAction | None) None
classmethod addActions(self, actions: Iterable[QAction])
classmethod adjustSize(self)
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

classmethod autoFillBackground(self) bool
autoRefresh()

Replots the plot if autoReplot() is True.

autoReplot()
Returns:

True if the autoReplot option is set.

See also

setAutoReplot()

axisAutoScale(axisId)
Parameters:

axisId (int) – Axis index

Returns:

True, if autoscaling is enabled

axisEnabled(axisId)
Parameters:

axisId (int) – Axis index

Returns:

True, if a specified axis is enabled

axisFont(axisId)
Parameters:

axisId (int) – Axis index

Returns:

The font of the scale labels for a specified axis

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()

axisMargin(axisId)
Parameters:

axisId (int) – Axis index

Returns:

Relative margin of the axis, as a fraction of the full axis range

See also

setAxisMargin()

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()

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()

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()

axisScaleDraw(axisId)
Parameters:

axisId (int) – Axis index

Returns:

Specified scaleDraw for axis, or NULL if axis is invalid.

axisScaleEngine(axisId)
Parameters:

axisId (int) – Axis index

Returns:

Scale engine for a specific axis

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()

axisTitle(axisId)
Parameters:

axisId (int) – Axis index

Returns:

Title of a specified axis

axisValid(axis_id)
Parameters:

axis_id (int) – Axis

Returns:

True if the specified axis exists, otherwise False

axisWidget(axisId)
Parameters:

axisId (int) – Axis index

Returns:

Scale widget of the specified axis, or None if axisId is invalid.

classmethod backgroundRole(self) QPalette.ColorRole
classmethod baseSize(self) QSize
classmethod blockSignals(self, b: bool) bool
canvas()
Returns:

the plot’s canvas

canvasBackground()
Returns:

Background brush of the plotting area.

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()

classmethod changeEvent(self, a0: QEvent | None)
classmethod childAt(self, p: QPoint) QWidget | None
classmethod childAt(self, p: QPointF) QWidget | None
classmethod childAt(self, ax: int, ay: int) QWidget | None
classmethod childEvent(self, a0: QChildEvent | None)
classmethod children(self) list[QObject]
classmethod childrenRect(self) QRect
classmethod childrenRegion(self) QRegion
classmethod clearFocus(self)
classmethod clearMask(self)
classmethod close(self) bool
classmethod closeEvent(self, a0: QCloseEvent | None)
classmethod colorCount(self) int
classmethod connectNotify(self, signal: QMetaMethod)
classmethod contentsMargins(self) QMargins
classmethod contentsRect(self) QRect
classmethod contextMenuEvent(self, a0: QContextMenuEvent | None)
classmethod contextMenuPolicy(self) Qt.ContextMenuPolicy
classmethod create(self, window: PyQt6.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)
classmethod createWindowContainer(window: QWindow | None, parent: QWidget | None = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
classmethod cursor(self) QCursor
classmethod customEvent(self, a0: QEvent | None)
classmethod deleteLater(self)
classmethod depth(self) int
classmethod destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
detachItems(rtti=None)

Detach items from the dictionary

Parameters:

rtti (int or None) – In case of QwtPlotItem.Rtti_PlotItem or None (default) detach all items otherwise only those items of the type rtti.

Note

This was a member of QwtPlotDict in older versions.

classmethod devType(self) int
classmethod devicePixelRatio(self) float
classmethod devicePixelRatioF(self) float
classmethod devicePixelRatioFScale() float
classmethod disconnect(a0: QMetaObject.Connection) bool
classmethod disconnect(self) None
classmethod disconnectNotify(self, signal: QMetaMethod)
classmethod dragEnterEvent(self, a0: QDragEnterEvent | None)
classmethod dragLeaveEvent(self, a0: QDragLeaveEvent | None)
classmethod dragMoveEvent(self, a0: QDragMoveEvent | None)
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()

classmethod drawFrame(self, a0: QPainter | None)
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()

classmethod dropEvent(self, a0: QDropEvent | None)
classmethod dumpObjectInfo(self)
classmethod dumpObjectTree(self)
classmethod dynamicPropertyNames(self) list[QByteArray]
classmethod effectiveWinId(self) PyQt6.sip.voidptr
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)

classmethod ensurePolished(self)
classmethod enterEvent(self, event: QEnterEvent | None)
event(self, e: QEvent | None) bool
eventFilter(self, a0: QObject | None, a1: QEvent | None) bool
exportTo(filename, size=(800, 600), size_mm=None, resolution=85, 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 (int) – Resolution in dots per Inch (dpi)

  • format (str) – File format (PDF, SVG, PNG, …)

classmethod find(a0: PyQt6.sip.voidptr) QWidget | None
classmethod findChild(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
classmethod findChild(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObjectT
classmethod findChildren(self, type: type[QObjectT], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
classmethod findChildren(self, types: tuple[type[QObjectT], ...], name: str | None = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
classmethod findChildren(self, type: type[QObjectT], re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
classmethod findChildren(self, types: tuple[type[QObjectT], ...], re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) list[QObjectT]
flatStyle()
Returns:

True if the flatStyle option is set.

See also

setFlatStyle()

classmethod focusInEvent(self, a0: QFocusEvent | None)
classmethod focusNextChild(self) bool
classmethod focusNextPrevChild(self, next: bool) bool
classmethod focusOutEvent(self, a0: QFocusEvent | None)
classmethod focusPolicy(self) Qt.FocusPolicy
classmethod focusPreviousChild(self) bool
classmethod focusProxy(self) QWidget | None
classmethod focusWidget(self) QWidget | None
classmethod font(self) QFont
classmethod fontInfo(self) QFontInfo
classmethod fontMetrics(self) QFontMetrics
footer()
Returns:

Text of the footer

See also

setFooter()

footerLabel()
Returns:

Footer label widget.

classmethod foregroundRole(self) QPalette.ColorRole
classmethod frameGeometry(self) QRect
classmethod frameRect(self) QRect
classmethod frameShadow(self) QFrame.Shadow
classmethod frameShape(self) QFrame.Shape
classmethod frameSize(self) QSize
classmethod frameStyle(self) int
classmethod frameWidth(self) int
classmethod geometry(self) QRect
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()

classmethod grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(-1, -1))) QPixmap
classmethod grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
classmethod grabKeyboard(self)
classmethod grabMouse(self)
classmethod grabMouse(self, a0: QCursor | Qt.CursorShape) None
classmethod grabShortcut(self, key: QKeySequence | QKeySequence.StandardKey | str | None | int, context: Qt.ShortcutContext = Qt.WindowShortcut) int
classmethod graphicsEffect(self) QGraphicsEffect | None
classmethod graphicsProxyWidget(self) QGraphicsProxyWidget | None
classmethod hasFocus(self) bool
classmethod hasHeightForWidth(self) bool
classmethod hasMouseTracking(self) bool
classmethod hasTabletTracking(self) bool
classmethod height(self) int
classmethod heightForWidth(self, a0: int) int
classmethod heightMM(self) int
classmethod hide(self)
classmethod hideEvent(self, a0: QHideEvent | None)
classmethod inherits(self, classname: str) bool
initAxesData()

Initialize axes

classmethod initPainter(self, painter: QPainter | None)
classmethod initStyleOption(self, option: QStyleOptionFrame | None)
classmethod inputMethodEvent(self, a0: QInputMethodEvent | None)
classmethod inputMethodHints(self) Qt.InputMethodHint
classmethod inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
classmethod insertAction(self, before: QAction | None, action: QAction | None)
classmethod insertActions(self, before: QAction | None, actions: Iterable[QAction])
insertItem(item)

Insert a plot item

Parameters:

item (qwt.plot.QwtPlotItem) – PlotItem

See also

removeItem()

Note

This was a member of QwtPlotDict in older versions.

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()

classmethod installEventFilter(self, a0: QObject | None)
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.

classmethod isActiveWindow(self) bool
classmethod isAncestorOf(self, child: QWidget | None) bool
classmethod isEnabled(self) bool
classmethod isEnabledTo(self, a0: QWidget | None) bool
classmethod isFullScreen(self) bool
classmethod isHidden(self) bool
classmethod isLeftToRight(self) bool
classmethod isMaximized(self) bool
classmethod isMinimized(self) bool
classmethod isModal(self) bool
classmethod isQuickItemType(self) bool
classmethod isRightToLeft(self) bool
classmethod isSignalConnected(self, signal: QMetaMethod) bool
classmethod isVisible(self) bool
classmethod isVisibleTo(self, a0: QWidget | None) bool
classmethod isWidgetType(self) bool
classmethod isWindow(self) bool
classmethod isWindowModified(self) bool
classmethod isWindowType(self) bool
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.

Note

This was a member of QwtPlotDict in older versions.

classmethod keyPressEvent(self, a0: QKeyEvent | None)
classmethod keyReleaseEvent(self, a0: QKeyEvent | None)
classmethod keyboardGrabber() QWidget | None
classmethod killTimer(self, id: int)
classmethod layout(self) QLayout | None
classmethod layoutDirection(self) Qt.LayoutDirection
classmethod leaveEvent(self, a0: QEvent | None)
legend()
Returns:

the plot’s legend

See also

insertLegend()

classmethod lineWidth(self) int
classmethod locale(self) QLocale
classmethod logicalDpiX(self) int
classmethod logicalDpiY(self) int
classmethod lower(self)
classmethod mapFrom(self, a0: QWidget | None, a1: QPoint) QPoint
classmethod mapFrom(self, a0: QWidget | None, a1: QPointF) QPointF
classmethod mapFromGlobal(self, a0: QPoint) QPoint
classmethod mapFromGlobal(self, a0: QPointF) QPointF
classmethod mapFromParent(self, a0: QPoint) QPoint
classmethod mapFromParent(self, a0: QPointF) QPointF
classmethod mapTo(self, a0: QWidget | None, a1: QPoint) QPoint
classmethod mapTo(self, a0: QWidget | None, a1: QPointF) QPointF
classmethod mapToGlobal(self, a0: QPoint) QPoint
classmethod mapToGlobal(self, a0: QPointF) QPointF
classmethod mapToParent(self, a0: QPoint) QPoint
classmethod mapToParent(self, a0: QPointF) QPointF
classmethod mask(self) QRegion
classmethod maximumHeight(self) int
classmethod maximumSize(self) QSize
classmethod maximumWidth(self) int
classmethod metaObject(self) QMetaObject | None
classmethod metric(self, a0: QPaintDevice.PaintDeviceMetric) int
classmethod midLineWidth(self) int
classmethod minimumHeight(self) int
classmethod minimumSize(self) QSize
minimumSizeHint()
Returns:

Return a minimum size hint

classmethod minimumWidth(self) int
classmethod mouseGrabber() QWidget | None
classmethod mouseMoveEvent(self, a0: QMouseEvent | None)
classmethod mousePressEvent(self, a0: QMouseEvent | None)
classmethod mouseReleaseEvent(self, a0: QMouseEvent | None)
classmethod move(self, a0: QPoint)
classmethod move(self, ax: int, ay: int) None
classmethod moveEvent(self, a0: QMoveEvent | None)
classmethod moveToThread(self, thread: QThread | None)
classmethod nativeEvent(self, eventType: QByteArray | bytes | bytearray | memoryview, message: PyQt6.sip.voidptr)
classmethod nativeParentWidget(self) QWidget | None
classmethod nextInFocusChain(self) QWidget | None
classmethod normalGeometry(self) QRect
classmethod objectName(self) str
classmethod overrideWindowFlags(self, type: Qt.WindowType)
classmethod overrideWindowState(self, state: Qt.WindowState)
classmethod paintEngine(self) QPaintEngine | None
classmethod paintEvent(self, a0: QPaintEvent | None)
classmethod paintingActive(self) bool
classmethod palette(self) QPalette
classmethod parent(self) QObject | None
classmethod parentWidget(self) QWidget | None
classmethod physicalDpiX(self) int
classmethod physicalDpiY(self) int
plotLayout()
Returns:

the plot’s layout

See also

setPlotLayout()

classmethod pos(self) QPoint
classmethod previousInFocusChain(self) QWidget | None
print_(printer)

Print plot to printer

Parameters:

printer (QPaintDevice or QPrinter or QSvgGenerator) – Printer

classmethod property(self, name: str) Any
classmethod 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.

classmethod raise_(self)
classmethod receivers(self, signal: PYQT_SIGNAL) int
classmethod rect(self) QRect
classmethod releaseKeyboard(self)
classmethod releaseMouse(self)
classmethod releaseShortcut(self, id: int)
classmethod removeAction(self, action: QAction | None)
classmethod removeEventFilter(self, a0: QObject | None)
removeItem(item)

Remove a plot item

Parameters:

item (qwt.plot.QwtPlotItem) – PlotItem

See also

insertItem()

Note

This was a member of QwtPlotDict in older versions.

classmethod render(self, target: QPaintDevice | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
classmethod render(self, painter: QPainter | None, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
classmethod repaint(self)
classmethod repaint(self, x: int, y: int, w: int, h: int) None
classmethod repaint(self, a0: QRect) None
classmethod repaint(self, a0: QRegion) None
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.

classmethod resize(self, a0: QSize)
classmethod resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent | None)
classmethod restoreGeometry(self, geometry: QByteArray | bytes | bytearray | memoryview) bool
classmethod saveGeometry(self) QByteArray
classmethod screen(self) QScreen | None
classmethod scroll(self, dx: int, dy: int)
classmethod scroll(self, dx: int, dy: int, a2: QRect) None
classmethod sender(self) QObject | None
classmethod senderSignalIndex(self) int
classmethod setAcceptDrops(self, on: bool)
classmethod setAccessibleDescription(self, description: str | None)
classmethod setAccessibleIdentifier(self, identifier: str | None)
classmethod setAccessibleName(self, name: str | None)
classmethod setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
classmethod setAutoFillBackground(self, enabled: bool)
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

autoReplot()

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

Note

The autoscaling flag has no effect until updateAxes() is executed ( called by replot() ).

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.

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()

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()

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()

setAxisMargin(axisId, margin)

Set the relative margin of the axis, as a fraction of the full axis range

Parameters:
  • axisId (int) – Axis index

  • margin (float) – Relative margin (float between 0 and 1)

See also

axisMargin()

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

axisMaxMajor()

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

axisMaxMinor()

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()

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

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.

setAxisScaleEngine(axisId, scaleEngine)

Change the scale engine for an axis

Parameters:
  • axisId (int) – Axis index

  • scaleEngine (qwt.scale_engine.QwtScaleEngine) – Scale engine

setAxisTitle(axisId, title)

Change the title of a specified axis

Parameters:
  • axisId (int) – Axis index

  • title (qwt.text.QwtText or str) – axis title

classmethod setBackgroundRole(self, a0: QPalette.ColorRole)
classmethod setBaseSize(self, basew: int, baseh: int)
classmethod setBaseSize(self, s: QSize) None
setCanvas(canvas)

Set the drawing canvas of the plot widget.

The default canvas is a QwtPlotCanvas.

Parameters:

canvas (QWidget) – Canvas Widget

See also

canvas()

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

classmethod setContentsMargins(self, left: int, top: int, right: int, bottom: int)
classmethod setContentsMargins(self, margins: QMargins) None
classmethod setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
classmethod setCursor(self, a0: QCursor | Qt.CursorShape)
classmethod setDisabled(self, a0: bool)
classmethod setEnabled(self, a0: bool)
classmethod setFixedHeight(self, h: int)
classmethod setFixedSize(self, a0: QSize)
classmethod setFixedSize(self, w: int, h: int) None
classmethod setFixedWidth(self, w: int)
setFlatStyle(state)

Set or reset the flatStyle option

If the flatStyle option is set, the plot will be rendered without any margin (scales, canvas, layout).

Enabling this option makes the plot look flat and compact.

The flatStyle option is set to True by default.

Parameters:

state (bool) – True or False.

See also

flatStyle()

classmethod setFocus(self)
classmethod setFocus(self, reason: Qt.FocusReason) None
classmethod setFocusPolicy(self, policy: Qt.FocusPolicy)
classmethod setFocusProxy(self, a0: QWidget | None)
classmethod setFont(self, a0: QFont)
setFooter(text)

Change the text the footer

Parameters:

text (str or qwt.text.QwtText) – New text of the footer

See also

footer()

classmethod setForegroundRole(self, a0: QPalette.ColorRole)
classmethod setFrameRect(self, a0: QRect)
classmethod setFrameShadow(self, a0: QFrame.Shadow)
classmethod setFrameShape(self, a0: QFrame.Shape)
classmethod setFrameStyle(self, a0: int)
classmethod setGeometry(self, a0: QRect)
classmethod setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
classmethod setGraphicsEffect(self, effect: QGraphicsEffect | None)
classmethod setHidden(self, hidden: bool)
classmethod setInputMethodHints(self, hints: Qt.InputMethodHint)
classmethod setLayout(self, a0: QLayout | None)
classmethod setLayoutDirection(self, direction: Qt.LayoutDirection)
classmethod setLineWidth(self, a0: int)
classmethod setLocale(self, locale: QLocale)
classmethod setMask(self, a0: QBitmap)
classmethod setMask(self, a0: QRegion) None
classmethod setMaximumHeight(self, maxh: int)
classmethod setMaximumSize(self, maxw: int, maxh: int)
classmethod setMaximumSize(self, s: QSize) None
classmethod setMaximumWidth(self, maxw: int)
classmethod setMidLineWidth(self, a0: int)
classmethod setMinimumHeight(self, minh: int)
classmethod setMinimumSize(self, minw: int, minh: int)
classmethod setMinimumSize(self, s: QSize) None
classmethod setMinimumWidth(self, minw: int)
classmethod setMouseTracking(self, enable: bool)
classmethod setObjectName(self, name: QByteArray | bytes | bytearray | memoryview | str | None)
classmethod setPalette(self, a0: QPalette)
classmethod setParent(self, parent: QWidget | None)
classmethod setParent(self, parent: QWidget | None, f: Qt.WindowType) None
setPlotLayout(layout)

Assign a new plot layout

Parameters:

layout (qwt.plot_layout.QwtPlotLayout) – Layout

See also

plotLayout()

classmethod setProperty(self, name: str, value: Any) bool
classmethod setScreen(self, a0: QScreen | None)
classmethod setShortcutAutoRepeat(self, id: int, enabled: bool = True)
classmethod setShortcutEnabled(self, id: int, enabled: bool = True)
classmethod setSizeIncrement(self, w: int, h: int)
classmethod setSizeIncrement(self, s: QSize) None
classmethod setSizePolicy(self, a0: QSizePolicy)
classmethod setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
classmethod setStatusTip(self, a0: str | None)
classmethod setStyle(self, a0: QStyle | None)
classmethod setStyleSheet(self, styleSheet: str | None)
classmethod setTabOrder(a0: QWidget | None, a1: QWidget | None)
classmethod setTabletTracking(self, enable: bool)
setTitle(title)

Change the plot’s title

Parameters:

title (str or qwt.text.QwtText) – New title

See also

title()

classmethod setToolTip(self, a0: str | None)
classmethod setToolTipDuration(self, msec: int)
classmethod setUpdatesEnabled(self, enable: bool)
classmethod setVisible(self, visible: bool)
classmethod setWhatsThis(self, a0: str | None)
classmethod setWindowFilePath(self, filePath: str | None)
classmethod setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
classmethod setWindowFlags(self, type: Qt.WindowType)
classmethod setWindowIcon(self, icon: QIcon)
classmethod setWindowIconText(self, a0: str | None)
classmethod setWindowModality(self, windowModality: Qt.WindowModality)
classmethod setWindowModified(self, a0: bool)
classmethod setWindowOpacity(self, level: float)
classmethod setWindowRole(self, a0: str | None)
classmethod setWindowState(self, state: Qt.WindowState)
classmethod setWindowTitle(self, a0: str | None)
classmethod sharedPainter(self) QPainter | None
classmethod show(self)
classmethod showFullScreen(self)
classmethod showMaximized(self)
classmethod showMinimized(self)
classmethod showNormal(self)
classmethod signalsBlocked(self) bool
classmethod size(self) QSize
classmethod sizeIncrement(self) QSize
classmethod sizePolicy(self) QSizePolicy
classmethod stackUnder(self, a0: QWidget | None)
classmethod startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
classmethod statusTip(self) str
classmethod style(self) QStyle | None
classmethod styleSheet(self) str
classmethod tabletEvent(self, a0: QTabletEvent | None)
classmethod testAttribute(self, attribute: Qt.WidgetAttribute) bool
classmethod thread(self) QThread | None
classmethod timerEvent(self, a0: QTimerEvent | None)
title()
Returns:

Title of the plot

See also

setTitle()

titleLabel()
Returns:

Title label widget.

classmethod toolTip(self) str
classmethod toolTipDuration(self) int
classmethod tr(sourceText: str, disambiguation: str = None, n: int = -1) str
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.

classmethod underMouse(self) bool
classmethod ungrabGesture(self, type: Qt.GestureType)
classmethod unsetCursor(self)
classmethod unsetLayoutDirection(self)
classmethod unsetLocale(self)
classmethod update(self)
classmethod update(self, a0: QRect) None
classmethod update(self, a0: QRegion) None
classmethod update(self, ax: int, ay: int, aw: int, ah: int) None
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()

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()

classmethod updateGeometry(self)
updateLayout()

Adjust plot content to its current size.

See also

resizeEvent()

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

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()

classmethod updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
classmethod updatesEnabled(self) bool
classmethod visibleRegion(self) QRegion
classmethod whatsThis(self) str
classmethod wheelEvent(self, a0: QWheelEvent | None)
classmethod width(self) int
classmethod widthMM(self) int
classmethod winId(self) PyQt6.sip.voidptr
classmethod window(self) QWidget | None
classmethod windowFilePath(self) str
classmethod windowFlags(self) Qt.WindowType
classmethod windowHandle(self) QWindow | None
classmethod windowIcon(self) QIcon
classmethod windowIconText(self) str
classmethod windowModality(self) Qt.WindowModality
classmethod windowOpacity(self) float
classmethod windowRole(self) str
classmethod windowState(self) Qt.WindowState
classmethod windowTitle(self) str
classmethod windowType(self) Qt.WindowType
classmethod x(self) int
classmethod y(self) int