Table Of Contents

Previous topic

Making executable Windows programs

This Page

GUIQwt reference

guiqwt.pyplot

The pyplot module provides an interactive plotting interface similar to Matplotlib‘s, i.e. with MATLAB-like syntax.

The guiqwt.pyplot module was designed to be as close as possible to the matplotlib.pyplot module, so that one could easily switch between these two modules by simply changing the import statement. Basically, if guiqwt does support the plotting commands called in your script, replacing import matplotlib.pyplot by import guiqwt.pyplot should suffice, as shown in the following example:

  • Simple example using matplotlib:

    import matplotlib.pyplot as plt
    import numpy as np
    x = np.linspace(-10, 10)
    plt.plot(x, x**2, 'r+')
    plt.show()
    
  • Switching from matplotlib to guiqwt is trivial:

    import guiqwt.pyplot as plt # only this line has changed!
    import numpy as np
    x = np.linspace(-10, 10)
    plt.plot(x, x**2, 'r+')
    plt.show()
    

Examples

>>> import numpy as np
>>> from guiqwt.pyplot import * # ugly but acceptable in an interactive session
>>> ion() # switching to interactive mode
>>> x = np.linspace(-5, 5, 1000)
>>> figure(1)
>>> subplot(2, 1, 1)
>>> plot(x, np.sin(x), "r+")
>>> plot(x, np.cos(x), "g-")
>>> errorbar(x, -1+x**2/20+.2*np.random.rand(len(x)), x/20)
>>> xlabel("Axe x")
>>> ylabel("Axe y")
>>> subplot(2, 1, 2)
>>> img = np.fromfunction(lambda x, y: np.sin((x/200.)*(y/200.)**2), (1000, 1000))
>>> xlabel("pixels")
>>> ylabel("pixels")
>>> zlabel("intensity")
>>> gray()
>>> imshow(img)
>>> figure("plotyy")
>>> plotyy(x, np.sin(x), x, np.cos(x))
>>> ylabel("sinus", "cosinus")
>>> show()

Reference

guiqwt.pyplot.interactive(state)[source]

Toggle interactive mode

guiqwt.pyplot.ion()[source]

Turn interactive mode on

guiqwt.pyplot.ioff()[source]

Turn interactive mode off

guiqwt.pyplot.figure(N=None)[source]

Create a new figure

guiqwt.pyplot.gcf()[source]

Get current figure

guiqwt.pyplot.gca()[source]

Get current axes

guiqwt.pyplot.show(mainloop=True)[source]

Show all figures and enter Qt event loop This should be the last line of your script

guiqwt.pyplot.subplot(n, m, k)[source]

Create a subplot command

Example: import numpy as np x = np.linspace(-5, 5, 1000) figure(1) subplot(2, 1, 1) plot(x, np.sin(x), “r+”) subplot(2, 1, 2) plot(x, np.cos(x), “g-”) show()

guiqwt.pyplot.close(N=None, all=False)[source]

Close figure

guiqwt.pyplot.title(text)[source]

Set current figure title

guiqwt.pyplot.xlabel(bottom='', top='')[source]

Set current x-axis label

guiqwt.pyplot.ylabel(left='', right='')[source]

Set current y-axis label

guiqwt.pyplot.zlabel(label)[source]

Set current z-axis label

guiqwt.pyplot.yreverse(reverse)[source]

Set y-axis direction of increasing values

reverse = False (default)
y-axis values increase from bottom to top
reverse = True
y-axis values increase from top to bottom
guiqwt.pyplot.grid(act)[source]

Toggle grid visibility

guiqwt.pyplot.legend(pos='TR')[source]

Add legend to current axes (pos=’TR’, ‘TL’, ‘BR’, ...)

guiqwt.pyplot.colormap(name)[source]

Set color map to name

guiqwt.pyplot.savefig(fname, format=None, draft=False)[source]

Save figure

Currently supports PDF and PNG formats only

guiqwt.pyplot.plot(*args, **kwargs)[source]

Plot curves

Example:

import numpy as np x = np.linspace(-5, 5, 1000) plot(x, np.sin(x), “r+”) plot(x, np.cos(x), “g-”) show()

guiqwt.pyplot.plotyy(x1, y1, x2, y2)[source]

Plot curves with two different y axes

Example:

import numpy as np x = np.linspace(-5, 5, 1000) plotyy(x, np.sin(x), x, np.cos(x)) ylabel(“sinus”, “cosinus”) show()

guiqwt.pyplot.semilogx(*args, **kwargs)[source]

Plot curves with logarithmic x-axis scale

Example:

import numpy as np x = np.linspace(-5, 5, 1000) semilogx(x, np.sin(12*x), “g-”) show()

guiqwt.pyplot.semilogy(*args, **kwargs)[source]

Plot curves with logarithmic y-axis scale

Example:

import numpy as np x = np.linspace(-5, 5, 1000) semilogy(x, np.sin(12*x), “g-”) show()

guiqwt.pyplot.loglog(*args, **kwargs)[source]

Plot curves with logarithmic x-axis and y-axis scales

Example:

import numpy as np x = np.linspace(-5, 5, 1000) loglog(x, np.sin(12*x), “g-”) show()

guiqwt.pyplot.errorbar(*args, **kwargs)[source]

Plot curves with error bars

Example:

import numpy as np x = np.linspace(-5, 5, 1000) errorbar(x, -1+x**2/20+.2*np.random.rand(len(x)), x/20) show()

guiqwt.pyplot.hist(data, bins=None, logscale=None, title=None, color=None)[source]

Plot 1-D histogram

Example:

from numpy.random import normal data = normal(0, 1, (2000, )) hist(data) show()

guiqwt.pyplot.imshow(data, interpolation=None, mask=None)[source]

Display the image in data to current axes interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’

Example:

import numpy as np x = np.linspace(-5, 5, 1000) img = np.fromfunction(lambda x, y:

np.sin((x/200.)*(y/200.)**2), (1000, 1000))

gray() imshow(img) show()

guiqwt.pyplot.pcolor(*args)[source]

Create a pseudocolor plot of a 2-D array

Example:

import numpy as np r = np.linspace(1., 16, 100) th = np.linspace(0., np.pi, 100) R, TH = np.meshgrid(r, th) X = R*np.cos(TH) Y = R*np.sin(TH) Z = 4*TH+R pcolor(X, Y, Z) show()

guiqwt.widgets.fit

The fit module provides an interactive curve fitting widget/dialog allowing:
  • to fit data manually (by moving sliders)
  • or automatically (with standard optimization algorithms provided by scipy).

Example

import numpy as np

from guiqwt.widgets.fit import FitParam, guifit

def test():
    x = np.linspace(-10, 10, 1000)
    y = np.cos(1.5*x)+np.random.rand(x.shape[0])*.2
    
    def fit(x, params):
        a, b = params
        return np.cos(b*x)+a
    
    a = FitParam("Offset", 1., 0., 2.)
    b = FitParam("Frequency", 2., 1., 10., logscale=True)
    params = [a, b]
    values = guifit(x, y, fit, params, xlabel="Time (s)", ylabel="Power (a.u.)")
    
    print(values)
    print([param.value for param in params])

if __name__ == "__main__":
    test()
_images/fit.png

Reference

guiqwt.widgets.fit.guifit(x, y, fitfunc, fitparams, fitargs=None, fitkwargs=None, wintitle=None, title=None, xlabel=None, ylabel=None, param_cols=1, auto_fit=True, winsize=None, winpos=None)[source]

GUI-based curve fitting tool

class guiqwt.widgets.fit.FitDialog(wintitle=None, icon='guiqwt.svg', edit=True, toolbar=False, options=None, parent=None, panels=None, param_cols=1, legend_anchor='TR', auto_fit=False)[source]
class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

FitDialog.accept()
FitDialog.acceptDrops() → bool
FitDialog.accepted

QDialog.accepted [signal]

FitDialog.accessibleDescription() → QString
FitDialog.accessibleName() → QString
FitDialog.actionEvent(QActionEvent)
FitDialog.actions() → list-of-QAction
FitDialog.activateWindow()
FitDialog.activate_default_tool()

Activate default tool

FitDialog.addAction(QAction)
FitDialog.addActions(list-of-QAction)
FitDialog.add_panel(panel)

Register a panel to the plot manager

Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
FitDialog.add_plot(plot, plot_id=<class 'guiqwt.plot.DefaultPlotID'>)
Register a plot to the plot manager:
  • plot: guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot object
  • plot_id (default id is the plot object’s id: id(plot)): unique ID identifying the plot (any Python object), this ID will be asked by the manager to access this plot later.
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
FitDialog.add_separator_tool(toolbar_id=None)

Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu

FitDialog.add_tool(ToolKlass, *args, **kwargs)
Register a tool to the manager
  • ToolKlass: tool’s class (guiqwt builtin tools are defined in module guiqwt.tools)
  • *args: arguments sent to the tool’s class
  • **kwargs: keyword arguments sent to the tool’s class
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
FitDialog.add_toolbar(toolbar, toolbar_id='default')

Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)

FitDialog.adjustSize()
FitDialog.autoFillBackground() → bool
FitDialog.backgroundRole() → QPalette.ColorRole
FitDialog.baseSize() → QSize
FitDialog.blockSignals(bool) → bool
FitDialog.changeEvent(QEvent)
FitDialog.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

FitDialog.childEvent(QChildEvent)
FitDialog.children() → list-of-QObject
FitDialog.childrenRect() → QRect
FitDialog.childrenRegion() → QRegion
FitDialog.clearFocus()
FitDialog.clearMask()
FitDialog.close() → bool
FitDialog.closeEvent(QCloseEvent)
FitDialog.colorCount() → int
FitDialog.configure_panels()

Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)

FitDialog.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

FitDialog.connectNotify(SIGNAL())
FitDialog.contentsMargins() → QMargins
FitDialog.contentsRect() → QRect
FitDialog.contextMenuEvent(QContextMenuEvent)
FitDialog.contextMenuPolicy() → Qt.ContextMenuPolicy
FitDialog.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
FitDialog.cursor() → QCursor
FitDialog.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

FitDialog.customEvent(QEvent)
FitDialog.deleteLater()
FitDialog.depth() → int
FitDialog.destroy(bool destroyWindow=True, bool destroySubWindows=True)
FitDialog.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

FitDialog.devType() → int
FitDialog.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

FitDialog.disconnectNotify(SIGNAL())
FitDialog.done(int)
FitDialog.dragEnterEvent(QDragEnterEvent)
FitDialog.dragLeaveEvent(QDragLeaveEvent)
FitDialog.dragMoveEvent(QDragMoveEvent)
FitDialog.dropEvent(QDropEvent)
FitDialog.dumpObjectInfo()
FitDialog.dumpObjectTree()
FitDialog.dynamicPropertyNames() → list-of-QByteArray
FitDialog.effectiveWinId() → int
FitDialog.emit(SIGNAL(), ...)
FitDialog.enabledChange(bool)
FitDialog.ensurePolished()
FitDialog.enterEvent(QEvent)
FitDialog.event(QEvent) → bool
FitDialog.eventFilter(QObject, QEvent) → bool
FitDialog.exec_() → int
FitDialog.extension() → QWidget
FitDialog.find(int) → QWidget
FitDialog.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

FitDialog.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

FitDialog.finished

QDialog.finished[int] [signal]

FitDialog.focusInEvent(QFocusEvent)
FitDialog.focusNextChild() → bool
FitDialog.focusNextPrevChild(bool) → bool
FitDialog.focusOutEvent(QFocusEvent)
FitDialog.focusPolicy() → Qt.FocusPolicy
FitDialog.focusPreviousChild() → bool
FitDialog.focusProxy() → QWidget
FitDialog.focusWidget() → QWidget
FitDialog.font() → QFont
FitDialog.fontChange(QFont)
FitDialog.fontInfo() → QFontInfo
FitDialog.fontMetrics() → QFontMetrics
FitDialog.foregroundRole() → QPalette.ColorRole
FitDialog.frameGeometry() → QRect
FitDialog.frameSize() → QSize
FitDialog.geometry() → QRect
FitDialog.getContentsMargins() -> (int, int, int, int)
FitDialog.get_active_plot()

Return the active plot

The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot

FitDialog.get_active_tool()

Return active tool

FitDialog.get_context_menu(plot=None)

Return widget context menu – built using active tools

FitDialog.get_contrast_panel()

Convenience function to get the contrast adjustment panel

Return None if the contrast adjustment panel has not been added to this manager

FitDialog.get_default_plot()

Return default plot

The default plot is the plot on which tools and panels will act.

FitDialog.get_default_tool()

Get default tool

FitDialog.get_default_toolbar()

Return default toolbar

FitDialog.get_fitfunc_arguments()

Return fitargs and fitkwargs

FitDialog.get_itemlist_panel()

Convenience function to get the item list panel

Return None if the item list panel has not been added to this manager

FitDialog.get_main()

Return the main (parent) widget

Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.

FitDialog.get_panel(panel_id)

Return panel from its ID Panel IDs are listed in module guiqwt.panels

FitDialog.get_plot(plot_id=<class 'guiqwt.plot.DefaultPlotID'>)

Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)

FitDialog.get_plots()

Return all registered plots

FitDialog.get_tool(ToolKlass)

Return tool instance from its class

FitDialog.get_toolbar(toolbar_id='default')

Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)

FitDialog.get_values()

Convenience method to get fit parameter values

FitDialog.get_xcs_panel()

Convenience function to get the X-axis cross section panel

Return None if the X-axis cross section panel has not been added to this manager

FitDialog.get_ycs_panel()

Convenience function to get the Y-axis cross section panel

Return None if the Y-axis cross section panel has not been added to this manager

FitDialog.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
FitDialog.grabKeyboard()
FitDialog.grabMouse()

QWidget.grabMouse(QCursor)

FitDialog.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
FitDialog.graphicsEffect() → QGraphicsEffect
FitDialog.graphicsProxyWidget() → QGraphicsProxyWidget
FitDialog.handle() → int
FitDialog.hasFocus() → bool
FitDialog.hasMouseTracking() → bool
FitDialog.height() → int
FitDialog.heightForWidth(int) → int
FitDialog.heightMM() → int
FitDialog.hide()
FitDialog.hideEvent(QHideEvent)
FitDialog.inherits(str) → bool
FitDialog.inputContext() → QInputContext
FitDialog.inputMethodEvent(QInputMethodEvent)
FitDialog.inputMethodHints() → Qt.InputMethodHints
FitDialog.inputMethodQuery(Qt.InputMethodQuery) → QVariant
FitDialog.insertAction(QAction, QAction)
FitDialog.insertActions(QAction, list-of-QAction)
FitDialog.installEventFilter(QObject)
FitDialog.isActiveWindow() → bool
FitDialog.isAncestorOf(QWidget) → bool
FitDialog.isEnabled() → bool
FitDialog.isEnabledTo(QWidget) → bool
FitDialog.isEnabledToTLW() → bool
FitDialog.isFullScreen() → bool
FitDialog.isHidden() → bool
FitDialog.isLeftToRight() → bool
FitDialog.isMaximized() → bool
FitDialog.isMinimized() → bool
FitDialog.isModal() → bool
FitDialog.isRightToLeft() → bool
FitDialog.isSizeGripEnabled() → bool
FitDialog.isTopLevel() → bool
FitDialog.isVisible() → bool
FitDialog.isVisibleTo(QWidget) → bool
FitDialog.isWidgetType() → bool
FitDialog.isWindow() → bool
FitDialog.isWindowModified() → bool
FitDialog.keyPressEvent(QKeyEvent)
FitDialog.keyReleaseEvent(QKeyEvent)
FitDialog.keyboardGrabber() → QWidget
FitDialog.killTimer(int)
FitDialog.languageChange()
FitDialog.layout() → QLayout
FitDialog.layoutDirection() → Qt.LayoutDirection
FitDialog.leaveEvent(QEvent)
FitDialog.locale() → QLocale
FitDialog.logicalDpiX() → int
FitDialog.logicalDpiY() → int
FitDialog.lower()
FitDialog.mapFrom(QWidget, QPoint) → QPoint
FitDialog.mapFromGlobal(QPoint) → QPoint
FitDialog.mapFromParent(QPoint) → QPoint
FitDialog.mapTo(QWidget, QPoint) → QPoint
FitDialog.mapToGlobal(QPoint) → QPoint
FitDialog.mapToParent(QPoint) → QPoint
FitDialog.mask() → QRegion
FitDialog.maximumHeight() → int
FitDialog.maximumSize() → QSize
FitDialog.maximumWidth() → int
FitDialog.metaObject() → QMetaObject
FitDialog.metric(QPaintDevice.PaintDeviceMetric) → int
FitDialog.minimumHeight() → int
FitDialog.minimumSize() → QSize
FitDialog.minimumSizeHint() → QSize
FitDialog.minimumWidth() → int
FitDialog.mouseDoubleClickEvent(QMouseEvent)
FitDialog.mouseGrabber() → QWidget
FitDialog.mouseMoveEvent(QMouseEvent)
FitDialog.mousePressEvent(QMouseEvent)
FitDialog.mouseReleaseEvent(QMouseEvent)
FitDialog.move(QPoint)

QWidget.move(int, int)

FitDialog.moveEvent(QMoveEvent)
FitDialog.moveToThread(QThread)
FitDialog.nativeParentWidget() → QWidget
FitDialog.nextInFocusChain() → QWidget
FitDialog.normalGeometry() → QRect
FitDialog.numColors() → int
FitDialog.objectName() → QString
FitDialog.open()
FitDialog.orientation() → Qt.Orientation
FitDialog.overrideWindowFlags(Qt.WindowFlags)
FitDialog.overrideWindowState(Qt.WindowStates)
FitDialog.paintEngine() → QPaintEngine
FitDialog.paintEvent(QPaintEvent)
FitDialog.paintingActive() → bool
FitDialog.palette() → QPalette
FitDialog.paletteChange(QPalette)
FitDialog.parent() → QObject
FitDialog.parentWidget() → QWidget
FitDialog.physicalDpiX() → int
FitDialog.physicalDpiY() → int
FitDialog.pos() → QPoint
FitDialog.previousInFocusChain() → QWidget
FitDialog.property(str) → QVariant
FitDialog.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.

FitDialog.raise_()
FitDialog.receivers(SIGNAL()) → int
FitDialog.rect() → QRect
FitDialog.refresh(slider_value=None)

Refresh Fit Tool dialog box

FitDialog.register_all_curve_tools()

Register standard, curve-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()

FitDialog.register_all_image_tools()

Register standard, image-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()

FitDialog.register_curve_tools()

Register only curve-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()

FitDialog.register_image_tools()

Register only image-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()

FitDialog.register_other_tools()

Register other common tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()

FitDialog.register_standard_tools()

Registering basic tools for standard plot dialog –> top of the context-menu

FitDialog.register_tools()

Register the plotting dialog box tools: the base implementation provides standard, curve-related and other tools - i.e. calling this method is exactly the same as calling guiqwt.plot.CurveDialog.register_all_curve_tools()

This method may be overriden to provide a fully customized set of tools

FitDialog.reject()
FitDialog.rejected

QDialog.rejected [signal]

FitDialog.releaseKeyboard()
FitDialog.releaseMouse()
FitDialog.releaseShortcut(int)
FitDialog.removeAction(QAction)
FitDialog.removeEventFilter(QObject)
FitDialog.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)

FitDialog.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

FitDialog.resetInputContext()
FitDialog.resize(QSize)

QWidget.resize(int, int)

FitDialog.resizeEvent(QResizeEvent)
FitDialog.restoreGeometry(QByteArray) → bool
FitDialog.result() → int
FitDialog.saveGeometry() → QByteArray
FitDialog.scroll(int, int)

QWidget.scroll(int, int, QRect)

FitDialog.sender() → QObject
FitDialog.senderSignalIndex() → int
FitDialog.setAcceptDrops(bool)
FitDialog.setAccessibleDescription(QString)
FitDialog.setAccessibleName(QString)
FitDialog.setAttribute(Qt.WidgetAttribute, bool on=True)
FitDialog.setAutoFillBackground(bool)
FitDialog.setBackgroundRole(QPalette.ColorRole)
FitDialog.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

FitDialog.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

FitDialog.setContextMenuPolicy(Qt.ContextMenuPolicy)
FitDialog.setCursor(QCursor)
FitDialog.setDisabled(bool)
FitDialog.setEnabled(bool)
FitDialog.setExtension(QWidget)
FitDialog.setFixedHeight(int)
FitDialog.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

FitDialog.setFixedWidth(int)
FitDialog.setFocus()

QWidget.setFocus(Qt.FocusReason)

FitDialog.setFocusPolicy(Qt.FocusPolicy)
FitDialog.setFocusProxy(QWidget)
FitDialog.setFont(QFont)
FitDialog.setForegroundRole(QPalette.ColorRole)
FitDialog.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

FitDialog.setGraphicsEffect(QGraphicsEffect)
FitDialog.setHidden(bool)
FitDialog.setInputContext(QInputContext)
FitDialog.setInputMethodHints(Qt.InputMethodHints)
FitDialog.setLayout(QLayout)
FitDialog.setLayoutDirection(Qt.LayoutDirection)
FitDialog.setLocale(QLocale)
FitDialog.setMask(QBitmap)

QWidget.setMask(QRegion)

FitDialog.setMaximumHeight(int)
FitDialog.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

FitDialog.setMaximumWidth(int)
FitDialog.setMinimumHeight(int)
FitDialog.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

FitDialog.setMinimumWidth(int)
FitDialog.setModal(bool)
FitDialog.setMouseTracking(bool)
FitDialog.setObjectName(QString)
FitDialog.setOrientation(Qt.Orientation)
FitDialog.setPalette(QPalette)
FitDialog.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

FitDialog.setProperty(str, QVariant) → bool
FitDialog.setResult(int)
FitDialog.setShortcutAutoRepeat(int, bool enabled=True)
FitDialog.setShortcutEnabled(int, bool enabled=True)
FitDialog.setShown(bool)
FitDialog.setSizeGripEnabled(bool)
FitDialog.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

FitDialog.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

FitDialog.setStatusTip(QString)
FitDialog.setStyle(QStyle)
FitDialog.setStyleSheet(QString)
FitDialog.setTabOrder(QWidget, QWidget)
FitDialog.setToolTip(QString)
FitDialog.setUpdatesEnabled(bool)
FitDialog.setVisible(bool)
FitDialog.setWhatsThis(QString)
FitDialog.setWindowFilePath(QString)
FitDialog.setWindowFlags(Qt.WindowFlags)
FitDialog.setWindowIcon(QIcon)
FitDialog.setWindowIconText(QString)
FitDialog.setWindowModality(Qt.WindowModality)
FitDialog.setWindowModified(bool)
FitDialog.setWindowOpacity(float)
FitDialog.setWindowRole(QString)
FitDialog.setWindowState(Qt.WindowStates)
FitDialog.setWindowTitle(QString)
FitDialog.set_active_tool(tool=None)

Set active tool (if tool argument is None, the active tool will be the default tool)

FitDialog.set_contrast_range(zmin, zmax)

Convenience function to set the contrast adjustment panel range

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
FitDialog.set_default_plot(plot)

Set default plot

The default plot is the plot on which tools and panels will act.

FitDialog.set_default_tool(tool)

Set default tool

FitDialog.set_default_toolbar(toolbar)

Set default toolbar

FitDialog.show()
FitDialog.showEvent(QShowEvent)
FitDialog.showExtension(bool)
FitDialog.showFullScreen()
FitDialog.showMaximized()
FitDialog.showMinimized()
FitDialog.showNormal()
FitDialog.signalsBlocked() → bool
FitDialog.size() → QSize
FitDialog.sizeHint() → QSize
FitDialog.sizeIncrement() → QSize
FitDialog.sizePolicy() → QSizePolicy
FitDialog.stackUnder(QWidget)
FitDialog.startTimer(int) → int
FitDialog.statusTip() → QString
FitDialog.style() → QStyle
FitDialog.styleSheet() → QString
FitDialog.tabletEvent(QTabletEvent)
FitDialog.testAttribute(Qt.WidgetAttribute) → bool
FitDialog.thread() → QThread
FitDialog.timerEvent(QTimerEvent)
FitDialog.toolTip() → QString
FitDialog.topLevelWidget() → QWidget
FitDialog.tr(str, str disambiguation=None, int n=-1) → QString
FitDialog.trUtf8(str, str disambiguation=None, int n=-1) → QString
FitDialog.underMouse() → bool
FitDialog.ungrabGesture(Qt.GestureType)
FitDialog.unsetCursor()
FitDialog.unsetLayoutDirection()
FitDialog.unsetLocale()
FitDialog.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

FitDialog.updateGeometry()
FitDialog.updateMicroFocus()
FitDialog.update_cross_sections()

Convenience function to update the cross section panels at once

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
FitDialog.update_tools_status(plot=None)

Update tools for current plot

FitDialog.updatesEnabled() → bool
FitDialog.visibleRegion() → QRegion
FitDialog.whatsThis() → QString
FitDialog.wheelEvent(QWheelEvent)
FitDialog.width() → int
FitDialog.widthMM() → int
FitDialog.winId() → int
FitDialog.window() → QWidget
FitDialog.windowActivationChange(bool)
FitDialog.windowFilePath() → QString
FitDialog.windowFlags() → Qt.WindowFlags
FitDialog.windowIcon() → QIcon
FitDialog.windowIconText() → QString
FitDialog.windowModality() → Qt.WindowModality
FitDialog.windowOpacity() → float
FitDialog.windowRole() → QString
FitDialog.windowState() → Qt.WindowStates
FitDialog.windowTitle() → QString
FitDialog.windowType() → Qt.WindowType
FitDialog.x() → int
FitDialog.x11Info() → QX11Info
FitDialog.x11PictureHandle() → int
FitDialog.y() → int
class guiqwt.widgets.fit.FitParam(name, value, min, max, logscale=False, steps=5000, format='%.3f', size_offset=0, unit='')[source]
copy()[source]

Return a copy of this fitparam

class guiqwt.widgets.fit.AutoFitParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

guiqwt.plot

The plot module provides the following features:
  • guiqwt.plot.PlotManager: the plot manager is an object to link plots, panels and tools together for designing highly versatile graphical user interfaces
  • guiqwt.plot.CurveWidget: a ready-to-use widget for curve displaying with an integrated and preconfigured plot manager providing the item list panel and curve-related tools
  • guiqwt.plot.CurveDialog: a ready-to-use dialog box for curve displaying with an integrated and preconfigured plot manager providing the item list panel and curve-related tools
  • guiqwt.plot.ImageWidget: a ready-to-use widget for curve and image displaying with an integrated and preconfigured plot manager providing the item list panel, the contrast adjustment panel, the cross section panels (along X and Y axes) and image-related tools (e.g. colormap selection tool)
  • guiqwt.plot.ImageDialog: a ready-to-use dialog box for curve and image displaying with an integrated and preconfigured plot manager providing the item list panel, the contrast adjustment panel, the cross section panels (along X and Y axes) and image-related tools (e.g. colormap selection tool)

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.tools
Module providing the plot tools
Module guiqwt.panels
Module providing the plot panels IDs
Module guiqwt.signals
Module providing all the end-user Qt SIGNAL objects defined in guiqwt
Module guiqwt.baseplot
Module providing the guiqwt plotting widget base class

Class diagrams

Curve-related widgets with integrated plot manager:

_images/curve_widgets.png

Image-related widgets with integrated plot manager:

_images/image_widgets.png

Building your own plot manager:

_images/my_plot_manager.png

Examples

Simple example without the plot manager:

from guidata.qt.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QPushButton
from guidata.qt.QtCore import SIGNAL

#---Import plot widget base class
from guiqwt.plot import CurveWidget
from guiqwt.builder import make
from guidata.configtools import get_icon
#---

class FilterTestWidget(QWidget):
    """
    Filter testing widget
    parent: parent widget (QWidget)
    x, y: NumPy arrays
    func: function object (the signal filter to be tested)
    """
    def __init__(self, parent, x, y, func):
        QWidget.__init__(self, parent)
        self.setMinimumSize(320, 200)
        self.x = x
        self.y = y
        self.func = func
        #---guiqwt curve item attribute:
        self.curve_item = None
        #---
        
    def setup_widget(self, title):
        #---Create the plot widget:
        curvewidget = CurveWidget(self)
        curvewidget.register_all_curve_tools()
        self.curve_item = make.curve([], [], color='b')
        curvewidget.plot.add_item(self.curve_item)
        curvewidget.plot.set_antialiasing(True)
        #---
        
        button = QPushButton("Test filter: %s" % title)
        self.connect(button, SIGNAL('clicked()'), self.process_data)
        vlayout = QVBoxLayout()
        vlayout.addWidget(curvewidget)
        vlayout.addWidget(button)
        self.setLayout(vlayout)
        
        self.update_curve()
        
    def process_data(self):
        self.y = self.func(self.y)
        self.update_curve()
        
    def update_curve(self):
        #---Update curve
        self.curve_item.set_data(self.x, self.y)
        self.curve_item.plot().replot()
        #---
    
    
class TestWindow(QWidget):
    def __init__(self):
        QWidget.__init__(self)
        self.setWindowTitle("Signal filtering (guiqwt)")
        self.setWindowIcon(get_icon('guiqwt.svg'))
        hlayout = QHBoxLayout()
        self.setLayout(hlayout)
        
    def add_plot(self, x, y, func, title):
        widget = FilterTestWidget(self, x, y, func)
        widget.setup_widget(title)
        self.layout().addWidget(widget)
        

def test():
    """Testing this simple Qt/guiqwt example"""
    from guidata.qt.QtGui import QApplication
    import numpy as np
    import scipy.signal as sps, scipy.ndimage as spi
    
    app = QApplication([])
    win = TestWindow()
    
    x = np.linspace(-10, 10, 500)
    y = np.random.rand(len(x))+5*np.sin(2*x**2)/x
    win.add_plot(x, y, lambda x: spi.gaussian_filter1d(x, 1.), "Gaussian")
    win.add_plot(x, y, sps.wiener, "Wiener")
    
    win.show()
    app.exec_()
        
        
if __name__ == '__main__':
    test()
    

Simple example with the plot manager: even if this simple example does not justify the use of the plot manager (this is an unnecessary complication here), it shows how to use it. In more complex applications, using the plot manager allows to design highly versatile graphical user interfaces.

from guidata.qt.QtGui import (QWidget, QVBoxLayout, QHBoxLayout, QPushButton,
                              QMainWindow)
from guidata.qt.QtCore import SIGNAL

#---Import plot widget base class
from guiqwt.curve import CurvePlot
from guiqwt.plot import PlotManager
from guiqwt.builder import make
from guidata.configtools import get_icon
#---

class FilterTestWidget(QWidget):
    """
    Filter testing widget
    parent: parent widget (QWidget)
    x, y: NumPy arrays
    func: function object (the signal filter to be tested)
    """
    def __init__(self, parent, x, y, func):
        QWidget.__init__(self, parent)
        self.setMinimumSize(320, 200)
        self.x = x
        self.y = y
        self.func = func
        #---guiqwt related attributes:
        self.plot = None
        self.curve_item = None
        #---
        
    def setup_widget(self, title):
        #---Create the plot widget:
        self.plot = CurvePlot(self)
        self.curve_item = make.curve([], [], color='b')
        self.plot.add_item(self.curve_item)
        self.plot.set_antialiasing(True)
        #---
        
        button = QPushButton("Test filter: %s" % title)
        self.connect(button, SIGNAL('clicked()'), self.process_data)
        vlayout = QVBoxLayout()
        vlayout.addWidget(self.plot)
        vlayout.addWidget(button)
        self.setLayout(vlayout)
        
        self.update_curve()
        
    def process_data(self):
        self.y = self.func(self.y)
        self.update_curve()
        
    def update_curve(self):
        #---Update curve
        self.curve_item.set_data(self.x, self.y)
        self.plot.replot()
        #---
    
    
class TestWindow(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        self.setWindowTitle("Signal filtering 2 (guiqwt)")
        self.setWindowIcon(get_icon('guiqwt.svg'))
        
        hlayout = QHBoxLayout()
        central_widget = QWidget(self)
        central_widget.setLayout(hlayout)
        self.setCentralWidget(central_widget)
        #---guiqwt plot manager
        self.manager = PlotManager(self)
        #---
        
    def add_plot(self, x, y, func, title):
        widget = FilterTestWidget(self, x, y, func)
        widget.setup_widget(title)
        self.centralWidget().layout().addWidget(widget)
        #---Register plot to manager
        self.manager.add_plot(widget.plot)
        #---
        
    def setup_window(self):
        #---Add toolbar and register manager tools
        toolbar = self.addToolBar("tools")
        self.manager.add_toolbar(toolbar, id(toolbar))
        self.manager.register_all_curve_tools()
        #---
        

def test():
    """Testing this simple Qt/guiqwt example"""
    from guidata.qt.QtGui import QApplication
    import numpy as np
    import scipy.signal as sps, scipy.ndimage as spi
    
    app = QApplication([])
    win = TestWindow()
    
    x = np.linspace(-10, 10, 500)
    y = np.random.rand(len(x))+5*np.sin(2*x**2)/x
    win.add_plot(x, y, lambda x: spi.gaussian_filter1d(x, 1.), "Gaussian")
    win.add_plot(x, y, sps.wiener, "Wiener")
    #---Setup window
    win.setup_window()
    #---
    
    win.show()
    app.exec_()
        
        
if __name__ == '__main__':
    test()
    

Reference

class guiqwt.plot.PlotManager(main)[source]

Construct a PlotManager object, a ‘controller’ that organizes relations between plots (i.e. guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot objects), panels, tools (see guiqwt.tools) and toolbars

activate_default_tool()[source]

Activate default tool

add_panel(panel)[source]

Register a panel to the plot manager

Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
add_plot(plot, plot_id=<class 'guiqwt.plot.DefaultPlotID'>)[source]
Register a plot to the plot manager:
  • plot: guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot object
  • plot_id (default id is the plot object’s id: id(plot)): unique ID identifying the plot (any Python object), this ID will be asked by the manager to access this plot later.
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
add_separator_tool(toolbar_id=None)[source]

Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu

add_tool(ToolKlass, *args, **kwargs)[source]
Register a tool to the manager
  • ToolKlass: tool’s class (guiqwt builtin tools are defined in module guiqwt.tools)
  • *args: arguments sent to the tool’s class
  • **kwargs: keyword arguments sent to the tool’s class
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
add_toolbar(toolbar, toolbar_id='default')[source]

Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)

configure_panels()[source]

Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)

get_active_plot()[source]

Return the active plot

The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot

get_active_tool()[source]

Return active tool

get_context_menu(plot=None)[source]

Return widget context menu – built using active tools

get_contrast_panel()[source]

Convenience function to get the contrast adjustment panel

Return None if the contrast adjustment panel has not been added to this manager

get_default_plot()[source]

Return default plot

The default plot is the plot on which tools and panels will act.

get_default_tool()[source]

Get default tool

get_default_toolbar()[source]

Return default toolbar

get_itemlist_panel()[source]

Convenience function to get the item list panel

Return None if the item list panel has not been added to this manager

get_main()[source]

Return the main (parent) widget

Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.

get_panel(panel_id)[source]

Return panel from its ID Panel IDs are listed in module guiqwt.panels

get_plot(plot_id=<class 'guiqwt.plot.DefaultPlotID'>)[source]

Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)

get_plots()[source]

Return all registered plots

get_tool(ToolKlass)[source]

Return tool instance from its class

get_toolbar(toolbar_id='default')[source]

Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)

get_xcs_panel()[source]

Convenience function to get the X-axis cross section panel

Return None if the X-axis cross section panel has not been added to this manager

get_ycs_panel()[source]

Convenience function to get the Y-axis cross section panel

Return None if the Y-axis cross section panel has not been added to this manager

register_all_curve_tools()[source]

Register standard, curve-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()

register_all_image_tools()[source]

Register standard, image-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()

register_curve_tools()[source]

Register only curve-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()

register_image_tools()[source]

Register only image-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()

register_other_tools()[source]

Register other common tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()

register_standard_tools()[source]

Registering basic tools for standard plot dialog –> top of the context-menu

set_active_tool(tool=None)[source]

Set active tool (if tool argument is None, the active tool will be the default tool)

set_contrast_range(zmin, zmax)[source]

Convenience function to set the contrast adjustment panel range

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
set_default_plot(plot)[source]

Set default plot

The default plot is the plot on which tools and panels will act.

set_default_tool(tool)[source]

Set default tool

set_default_toolbar(toolbar)[source]

Set default toolbar

update_cross_sections()[source]

Convenience function to update the cross section panels at once

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
update_tools_status(plot=None)[source]

Update tools for current plot

class guiqwt.plot.CurveWidget(parent=None, title=None, xlabel=None, ylabel=None, xunit=None, yunit=None, section='plot', show_itemlist=False, gridparam=None, panels=None)[source]

Construct a CurveWidget object: plotting widget with integrated plot manager

  • parent: parent widget
  • 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
  • panels (optional): additionnal panels (list, tuple)
class guiqwt.plot.CurveDialog(wintitle='guiqwt plot', icon='guiqwt.svg', edit=False, toolbar=False, options=None, parent=None, panels=None)[source]

Construct a CurveDialog object: plotting dialog box with integrated plot manager

  • wintitle: window title
  • icon: window icon
  • edit: editable state
  • toolbar: show/hide toolbar
  • options: options sent to the guiqwt.curve.CurvePlot object (dictionary)
  • parent: parent widget
  • panels (optional): additionnal panels (list, tuple)
install_button_layout()[source]

Install standard buttons (OK, Cancel) in dialog button box layout (guiqwt.plot.CurveDialog.button_layout)

This method may be overriden to customize the button box

class guiqwt.plot.ImageWidget(parent=None, title='', xlabel=('', ''), ylabel=('', ''), zlabel=None, xunit=('', ''), yunit=('', ''), zunit=None, yreverse=True, colormap='jet', aspect_ratio=1.0, lock_aspect_ratio=True, show_contrast=False, show_itemlist=False, show_xsection=False, show_ysection=False, xsection_pos='top', ysection_pos='right', gridparam=None, panels=None)[source]

Construct a ImageWidget object: plotting widget with integrated plot manager

  • parent: parent widget
  • title: plot title (string)
  • xlabel, ylabel, zlabel: resp. bottom, left and right axis titles (strings)
  • xunit, yunit, zunit: resp. bottom, left and right axis units (strings)
  • yreverse: reversing Y-axis (bool)
  • aspect_ratio: height to width ratio (float)
  • lock_aspect_ratio: locking aspect ratio (bool)
  • show_contrast: showing contrast adjustment tool (bool)
  • show_xsection: showing x-axis cross section plot (bool)
  • show_ysection: showing y-axis cross section plot (bool)
  • xsection_pos: x-axis cross section plot position (string: “top”, “bottom”)
  • ysection_pos: y-axis cross section plot position (string: “left”, “right”)
  • panels (optional): additionnal panels (list, tuple)
class guiqwt.plot.ImageDialog(wintitle='guiqwt plot', icon='guiqwt.svg', edit=False, toolbar=False, options=None, parent=None, panels=None)[source]

Construct a ImageDialog object: plotting dialog box with integrated plot manager

  • wintitle: window title
  • icon: window icon
  • edit: editable state
  • toolbar: show/hide toolbar
  • options: options sent to the guiqwt.image.ImagePlot object (dictionary)
  • parent: parent widget
  • panels (optional): additionnal panels (list, tuple)

guiqwt.builder

The builder module provides a builder singleton class used to simplify the creation of plot items.

Example

Before creating any widget, a QApplication must be instantiated (that is a Qt internal requirement):

>>> import guidata
>>> app = guidata.qapplication()

that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):

>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])

now that a QApplication object exists, we may create the plotting widget:

>>> from guiqwt.plot import ImageWidget
>>> widget = ImageWidget()

create curves, images, histograms, etc. and attach them to the plot:

>>> from guiqwt.builder import make
>>> curve = make.mcure(x, y, 'r+')
>>> image = make.image(data)
>>> hist = make.histogram(data, 100)
>>> for item in (curve, image, hist):
...     widget.plot.add_item()

and then show the widget to screen:

>>> widget.show()
>>> app.exec_()

Reference

class guiqwt.builder.PlotItemBuilder[source]

This is just a bare class used to regroup a set of factory functions in a single object

annotated_circle(x0, y0, x1, y1, ratio, title=None, subtitle=None)[source]

Make an annotated circle plot item (guiqwt.annotations.AnnotatedCircle object)

  • x0, y0, x1, y1: circle diameter coordinates
  • title, subtitle: strings
annotated_ellipse(x0, y0, x1, y1, ratio, title=None, subtitle=None)[source]

Make an annotated ellipse plot item (guiqwt.annotations.AnnotatedEllipse object)

  • x0, y0, x1, y1: ellipse rectangle coordinates
  • ratio: ratio between y-axis and x-axis lengths
  • title, subtitle: strings
annotated_rectangle(x0, y0, x1, y1, title=None, subtitle=None)[source]

Make an annotated rectangle plot item (guiqwt.annotations.AnnotatedRectangle object)

  • x0, y0, x1, y1: rectangle coordinates
  • title, subtitle: strings
annotated_segment(x0, y0, x1, y1, title=None, subtitle=None)[source]

Make an annotated segment plot item (guiqwt.annotations.AnnotatedSegment object)

  • x0, y0, x1, y1: segment coordinates
  • title, subtitle: strings
circle(x0, y0, x1, y1, title=None)[source]

Make a circle shape plot item (guiqwt.shapes.EllipseShape object)

  • x0, y0, x1, y1: circle diameter coordinates
  • title: label name (optional)
computation(range, anchor, label, curve, function, title=None)[source]

Make a computation label plot item (guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)

computation2d(rect, anchor, label, image, function, title=None)[source]

Make a 2D computation label plot item (guiqwt.label.RangeComputation2d object) (see example: guiqwt.tests.computations)

computations(range, anchor, specs, title=None)[source]

Make computation labels plot item (guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)

computations2d(rect, anchor, specs, title=None)[source]

Make 2D computation labels plot item (guiqwt.label.RangeComputation2d object) (see example: guiqwt.tests.computations)

static compute_bounds(data, pixel_size, center_on)[source]

Return image bounds from pixel_size (scalar or tuple)

curve(x, y, title='', color=None, linestyle=None, linewidth=None, marker=None, markersize=None, markerfacecolor=None, markeredgecolor=None, shade=None, fitted=None, curvestyle=None, curvetype=None, baseline=None, xaxis='bottom', yaxis='left')[source]

Make a curve plot item from x, y, data (guiqwt.curve.CurveItem object)

  • x: 1D NumPy array
  • y: 1D NumPy array
  • color: curve color name
  • linestyle: curve line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
  • linewidth: line width (pixels)
  • marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
  • markersize: marker size (pixels)
  • markerfacecolor: marker face color name
  • markeredgecolor: marker edge color name
  • shade: 0 <= float <= 1 (curve shade)
  • fitted: boolean (fit curve to data)
  • curvestyle: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveStyle enum (i.e. “Lines”, “Sticks”, “Steps”, “Dots” or “NoCurve”)
  • curvetype: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveType enum (i.e. “Yfx” or “Xfy”)
  • baseline (float: default=0.0): the baseline is needed for filling the curve with a brush or the Sticks drawing style. The interpretation of the baseline depends on the curve type (horizontal line for “Yfx”, vertical line for “Xfy”)
  • xaxis, yaxis: X/Y axes bound to curve

Examples: curve(x, y, marker=’Ellipse’, markerfacecolor=’#ffffff’) which is equivalent to (MATLAB-style support): curve(x, y, marker=’o’, markerfacecolor=’w’)

ellipse(x0, y0, x1, y1, title=None)[source]

Make an ellipse shape plot item (guiqwt.shapes.EllipseShape object)

  • x0, y0, x1, y1: ellipse x-axis coordinates
  • title: label name (optional)
error(x, y, dx, dy, title='', color=None, linestyle=None, linewidth=None, errorbarwidth=None, errorbarcap=None, errorbarmode=None, errorbaralpha=None, marker=None, markersize=None, markerfacecolor=None, markeredgecolor=None, shade=None, fitted=None, curvestyle=None, curvetype=None, baseline=None, xaxis='bottom', yaxis='left')[source]

Make an errorbar curve plot item (guiqwt.curve.ErrorBarCurveItem object)

  • x: 1D NumPy array
  • y: 1D NumPy array
  • dx: None, or scalar, or 1D NumPy array
  • dy: None, or scalar, or 1D NumPy array
  • color: curve color name
  • linestyle: curve line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
  • linewidth: line width (pixels)
  • marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
  • markersize: marker size (pixels)
  • markerfacecolor: marker face color name
  • markeredgecolor: marker edge color name
  • shade: 0 <= float <= 1 (curve shade)
  • fitted: boolean (fit curve to data)
  • curvestyle: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveStyle enum (i.e. “Lines”, “Sticks”, “Steps”, “Dots” or “NoCurve”)
  • curvetype: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveType enum (i.e. “Yfx” or “Xfy”)
  • baseline (float: default=0.0): the baseline is needed for filling the curve with a brush or the Sticks drawing style. The interpretation of the baseline depends on the curve type (horizontal line for “Yfx”, vertical line for “Xfy”)
  • xaxis, yaxis: X/Y axes bound to curve
Examples::
error(x, y, None, dy, marker=’Ellipse’, markerfacecolor=’#ffffff’) which is equivalent to (MATLAB-style support): error(x, y, None, dy, marker=’o’, markerfacecolor=’w’)
grid(background=None, major_enabled=None, minor_enabled=None, major_style=None, minor_style=None)[source]
Make a grid plot item (guiqwt.curve.GridItem object)
  • background = canvas background color
  • major_enabled = tuple (major_xenabled, major_yenabled)
  • minor_enabled = tuple (minor_xenabled, minor_yenabled)
  • major_style = tuple (major_xstyle, major_ystyle)
  • minor_style = tuple (minor_xstyle, minor_ystyle)

Style: tuple (style, color, width)

gridparam(background=None, major_enabled=None, minor_enabled=None, major_style=None, minor_style=None)[source]
Make guiqwt.styles.GridParam instance
  • background = canvas background color
  • major_enabled = tuple (major_xenabled, major_yenabled)
  • minor_enabled = tuple (minor_xenabled, minor_yenabled)
  • major_style = tuple (major_xstyle, major_ystyle)
  • minor_style = tuple (minor_xstyle, minor_ystyle)

Style: tuple (style, color, width)

hcursor(y, label=None, constraint_cb=None, movable=True, readonly=False)[source]

Make an horizontal cursor plot item

Convenient function to make an horizontal marker (guiqwt.shapes.Marker object)

histogram(data, bins=None, logscale=None, title='', color=None, xaxis='bottom', yaxis='left')[source]

Make 1D Histogram plot item (guiqwt.histogram.HistogramItem object)

  • data (1D NumPy array)
  • bins: number of bins (int)
  • logscale: Y-axis scale (bool)
histogram2D(X, Y, NX=None, NY=None, logscale=None, title=None, transparent=None, Z=None, computation=-1, interpolation=0)[source]

Make a 2D Histogram plot item (guiqwt.image.Histogram2DItem object)

  • X: data (1D array)
  • Y: data (1D array)
  • NX: Number of bins along x-axis (int)
  • NY: Number of bins along y-axis (int)
  • logscale: Z-axis scale (bool)
  • title: item title (string)
  • transparent: enable transparency (bool)
image(data=None, filename=None, title=None, alpha_mask=None, alpha=None, background_color=None, colormap=None, xdata=[None, None], ydata=[None, None], pixel_size=None, center_on=None, interpolation='linear', eliminate_outliers=None, xformat='%.1f', yformat='%.1f', zformat='%.1f')[source]

Make an image plot item from data (guiqwt.image.ImageItem object or guiqwt.image.RGBImageItem object if data has 3 dimensions)

imagefilter(xmin, xmax, ymin, ymax, imageitem, filter, title=None)[source]

Make a rectangular area image filter plot item (guiqwt.image.ImageFilterItem object)

  • xmin, xmax, ymin, ymax: filter area bounds
  • imageitem: An imageitem instance
  • filter: function (x, y, data) –> data
info_label(anchor, comps, title=None)[source]

Make an info label plot item (guiqwt.label.DataInfoLabel object)

label(text, g, c, anchor, title='')[source]

Make a label plot item (guiqwt.label.LabelItem object)

  • text: label text (string)
  • g: position in plot coordinates (tuple) or relative position (string)
  • c: position in canvas coordinates (tuple)
  • anchor: anchor position in relative position (string)
  • title: label name (optional)
Examples::
make.label(“Relative position”, (x[0], y[0]), (10, 10), “BR”) make.label(“Absolute position”, “R”, (0,0), “R”)
legend(anchor='TR', c=None, restrict_items=None)[source]

Make a legend plot item (guiqwt.label.LegendBoxItem or guiqwt.label.SelectedLegendBoxItem object)

  • anchor: legend position in relative position (string)

  • c (optional): position in canvas coordinates (tuple)

  • restrict_items (optional):
    • None: all items are shown in legend box
    • []: no item shown
    • [item1, item2]: item1, item2 are shown in legend box
marker(position=None, label_cb=None, constraint_cb=None, movable=True, readonly=False, markerstyle=None, markerspacing=None, color=None, linestyle=None, linewidth=None, marker=None, markersize=None, markerfacecolor=None, markeredgecolor=None)[source]

Make a marker plot item (guiqwt.shapes.Marker object)

  • position: tuple (x, y)
  • label_cb: function with two arguments (x, y) returning a string
  • constraint_cb: function with two arguments (x, y) returning a tuple (x, y) according to the marker constraint
  • movable: if True (default), marker will be movable
  • readonly: if False (default), marker can be deleted
  • markerstyle: ‘+’, ‘-‘, ‘|’ or None
  • markerspacing: spacing between text and marker line
  • color: marker color name
  • linestyle: marker line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
  • linewidth: line width (pixels)
  • marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
  • markersize: marker size (pixels)
  • markerfacecolor: marker face color name
  • markeredgecolor: marker edge color name
maskedimage(data=None, mask=None, filename=None, title=None, alpha_mask=False, alpha=1.0, xdata=[None, None], ydata=[None, None], pixel_size=None, center_on=None, background_color=None, colormap=None, show_mask=False, fill_value=None, interpolation='linear', eliminate_outliers=None, xformat='%.1f', yformat='%.1f', zformat='%.1f')[source]

Make a masked image plot item from data (guiqwt.image.MaskedImageItem object)

mcurve(*args, **kwargs)[source]

Make a curve plot item based on MATLAB-like syntax (may returns a list of curves if data contains more than one signal) (guiqwt.curve.CurveItem object)

Example: mcurve(x, y, ‘r+’)

merror(*args, **kwargs)[source]

Make an errorbar curve plot item based on MATLAB-like syntax (guiqwt.curve.ErrorBarCurveItem object)

Example: mcurve(x, y, ‘r+’)

pcolor(*args, **kwargs)[source]

Make a pseudocolor plot item of a 2D array based on MATLAB-like syntax (guiqwt.image.QuadGridItem object)

Examples:
pcolor(C) pcolor(X, Y, C)
pcurve(x, y, param, xaxis='bottom', yaxis='left')[source]

Make a curve plot item based on a guiqwt.styles.CurveParam instance (guiqwt.curve.CurveItem object)

Usage: pcurve(x, y, param)

perror(x, y, dx, dy, curveparam, errorbarparam, xaxis='bottom', yaxis='left')[source]

Make an errorbar curve plot item based on a guiqwt.styles.ErrorBarParam instance (guiqwt.curve.ErrorBarCurveItem object)

  • x: 1D NumPy array
  • y: 1D NumPy array
  • dx: None, or scalar, or 1D NumPy array
  • dy: None, or scalar, or 1D NumPy array
  • curveparam: guiqwt.styles.CurveParam object
  • errorbarparam: guiqwt.styles.ErrorBarParam object
  • xaxis, yaxis: X/Y axes bound to curve

Usage: perror(x, y, dx, dy, curveparam, errorbarparam)

phistogram(data, curveparam, histparam, xaxis='bottom', yaxis='left')[source]

Make 1D histogram plot item (guiqwt.histogram.HistogramItem object) based on a guiqwt.styles.CurveParam and guiqwt.styles.HistogramParam instances

Usage: phistogram(data, curveparam, histparam)

quadgrid(X, Y, Z, filename=None, title=None, alpha_mask=None, alpha=None, background_color=None, colormap=None, interpolation='linear')[source]

Make a pseudocolor plot item of a 2D array (guiqwt.image.QuadGridItem object)

range_info_label(range, anchor, label, function=None, title=None)[source]

Make an info label plot item showing an XRangeSelection object infos

Default function is lambda x, dx: (x, dx).

x = linspace(-10, 10, 10) y = sin(sin(sin(x))) range = make.range(-2, 2) disp = make.range_info_label(range, ‘BL’, “x = %.1f ± %.1f cm”,

lambda x, dx: (x, dx))

(guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)

rectangle(x0, y0, x1, y1, title=None)[source]

Make a rectangle shape plot item (guiqwt.shapes.RectangleShape object)

  • x0, y0, x1, y1: rectangle coordinates
  • title: label name (optional)
rgbimage(data=None, filename=None, title=None, alpha_mask=False, alpha=1.0, xdata=[None, None], ydata=[None, None], pixel_size=None, center_on=None, interpolation='linear')[source]

Make a RGB image plot item from data (guiqwt.image.RGBImageItem object)

segment(x0, y0, x1, y1, title=None)[source]

Make a segment shape plot item (guiqwt.shapes.SegmentShape object)

  • x0, y0, x1, y1: segment coordinates
  • title: label name (optional)
trimage(data=None, filename=None, title=None, alpha_mask=None, alpha=None, background_color=None, colormap=None, x0=0.0, y0=0.0, angle=0.0, dx=1.0, dy=1.0, interpolation='linear', eliminate_outliers=None, xformat='%.1f', yformat='%.1f', zformat='%.1f')[source]

Make a transformable image plot item (image with an arbitrary affine transform) (guiqwt.image.TrImageItem object)

  • data: 2D NumPy array (image pixel data)
  • filename: image filename (if data is not specified)
  • title: image title (optional)
  • x0, y0: position
  • angle: angle (radians)
  • dx, dy: pixel size along X and Y axes
  • interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’ (5x5)
vcursor(x, label=None, constraint_cb=None, movable=True, readonly=False)[source]

Make a vertical cursor plot item

Convenient function to make a vertical marker (guiqwt.shapes.Marker object)

xcursor(x, y, label=None, constraint_cb=None, movable=True, readonly=False)[source]

Make an cross cursor plot item

Convenient function to make an cross marker (guiqwt.shapes.Marker object)

xyimage(x, y, data, title=None, alpha_mask=None, alpha=None, background_color=None, colormap=None, interpolation='linear', eliminate_outliers=None, xformat='%.1f', yformat='%.1f', zformat='%.1f')[source]

Make an xyimage plot item (image with non-linear X/Y axes) from data (guiqwt.image.XYImageItem object)

  • x: 1D NumPy array
  • y: 1D NumPy array
  • data: 2D NumPy array (image pixel data)
  • title: image title (optional)
  • interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’ (5x5)

guiqwt.panels

The panels module provides guiqwt.curve.PanelWidget (the panel widget class from which all panels must derived) and identifiers for each kind of panel:

  • guiqwt.panels.ID_ITEMLIST: ID of the item list panel
  • guiqwt.panels.ID_CONTRAST: ID of the contrast adjustment panel
  • guiqwt.panels.ID_XCS: ID of the X-axis cross section panel
  • guiqwt.panels.ID_YCS: ID of the Y-axis cross section panel

See also

Module guiqwt.plot
Module providing ready-to-use curve and image plotting widgets and dialog boxes
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.tools
Module providing the plot tools

guiqwt.signals

The signals module contains constants defining the custom Qt SIGNAL objects used by guiqwt: the signals definition are gathered here to avoid mispelling signals at connect and emit sites.

Signals available:
guiqwt.signals.SIG_ITEM_MOVED

Emitted by plot when an IBasePlotItem-like object was moved from (x0, y0) to (x1, y1)

Arguments: item object, x0, y0, x1, y1

guiqwt.signals.SIG_MARKER_CHANGED

Emitted by plot when a guiqwt.shapes.Marker position changes

Arguments: guiqwt.shapes.Marker object

guiqwt.signals.SIG_AXES_CHANGED

Emitted by plot when a guiqwt.shapes.Axes position (or angle) changes

Arguments: guiqwt.shapes.Axes object

guiqwt.signals.SIG_ANNOTATION_CHANGED

Emitted by plot when an annotations.AnnotatedShape position changes

Arguments: annotation item

guiqwt.signals.SIG_RANGE_CHANGED

Emitted by plot when a shapes.XRangeSelection range changes

Arguments: range object, lower_bound, upper_bound

guiqwt.signals.SIG_ITEMS_CHANGED

Emitted by plot when item list has changed (item removed, added, ...)

Arguments: plot

guiqwt.signals.SIG_ACTIVE_ITEM_CHANGED

Emitted by plot when selected item has changed

Arguments: plot

guiqwt.signals.SIG_ITEM_REMOVED

Emitted by plot when an item was deleted from the itemlist or using the delete item tool

Arguments: removed item

guiqwt.signals.SIG_ITEM_SELECTION_CHANGED

Emitted by plot when an item is selected

Arguments: plot

guiqwt.signals.SIG_PLOT_LABELS_CHANGED

Emitted (by plot) when plot’s title or any axis label has changed

Arguments: plot

guiqwt.signals.SIG_AXIS_DIRECTION_CHANGED

Emitted (by plot) when any plot axis direction has changed

Arguments: plot

guiqwt.signals.SIG_VOI_CHANGED
Emitted by “contrast” panel’s histogram when the lut range of some items changed (for now, this signal is for guiqwt.histogram module’s internal use only - the ‘public’ counterpart of this signal is SIG_LUT_CHANGED, see below)
guiqwt.signals.SIG_LUT_CHANGED

Emitted by plot when LUT has been changed by the user

Arguments: plot

guiqwt.signals.SIG_MASK_CHANGED

Emitted by plot when image mask has changed

Arguments: MaskedImageItem object

guiqwt.signals.SIG_VISIBILITY_CHANGED

Emitted for example by panels when their visibility has changed

Arguments: state (boolean)

guiqwt.signals.SIG_VALIDATE_TOOL

Emitted by an interactive tool to notify that the tool has just been “validated”, i.e. <ENTER>, <RETURN> or <SPACE> was pressed

Arguments: filter

guiqwt.baseplot

The baseplot module provides the guiqwt plotting widget base class: guiqwt.baseplot.BasePlot. This is an enhanced version of PyQwt‘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.

Signals: SIG_ITEMS_CHANGED, SIG_ACTIVE_ITEM_CHANGED

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

BasePlot.acceptDrops() → bool
BasePlot.accessibleDescription() → QString
BasePlot.accessibleName() → QString
BasePlot.actions() → list-of-QAction
BasePlot.activateWindow()
BasePlot.addAction(QAction)
BasePlot.addActions(list-of-QAction)
BasePlot.add_item(item, z=None)[source]

Add a plot item instance to this plot widget

item: QwtPlotItem (PyQt4.Qwt5) object implementing
the IBasePlotItem interface (guiqwt.interfaces)
BasePlot.add_item_with_z_offset(item, zoffset)[source]

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

BasePlot.adjustSize()
BasePlot.autoFillBackground() → bool
BasePlot.backgroundRole() → QPalette.ColorRole
BasePlot.baseSize() → QSize
BasePlot.blockSignals(bool) → bool
BasePlot.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

BasePlot.children() → list-of-QObject
BasePlot.childrenRect() → QRect
BasePlot.childrenRegion() → QRegion
BasePlot.clearFocus()
BasePlot.clearMask()
BasePlot.close() → bool
BasePlot.colorCount() → int
BasePlot.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

BasePlot.contentsMargins() → QMargins
BasePlot.contentsRect() → QRect
BasePlot.contextMenuPolicy() → Qt.ContextMenuPolicy
BasePlot.copy_to_clipboard()[source]

Copy widget’s window to clipboard

BasePlot.cursor() → QCursor
BasePlot.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

BasePlot.del_all_items()[source]

Remove (detach) all attached items

BasePlot.del_item(item)[source]

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

BasePlot.del_items(items)[source]

Remove item from widget

BasePlot.deleteLater()
BasePlot.depth() → int
BasePlot.deserialize(reader)[source]
Restore items from HDF5 file:
  • reader: guidata.hdf5io.HDF5Reader object

See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()

BasePlot.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

BasePlot.devType() → int
BasePlot.disable_autoscale()[source]

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

BasePlot.disable_unused_axes()[source]

Disable unused axes

BasePlot.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

BasePlot.do_autoscale(replot=True)[source]

Do autoscale on all axes

BasePlot.dumpObjectInfo()
BasePlot.dumpObjectTree()
BasePlot.dynamicPropertyNames() → list-of-QByteArray
BasePlot.edit_axis_parameters(axis_id)[source]

Edit axis parameters

BasePlot.edit_plot_parameters(key)[source]

Edit plot parameters

BasePlot.effectiveWinId() → int
BasePlot.emit(SIGNAL(), ...)
BasePlot.enable_used_axes()[source]

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

BasePlot.ensurePolished()
BasePlot.eventFilter(QObject, QEvent) → bool
BasePlot.find(int) → QWidget
BasePlot.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

BasePlot.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

BasePlot.focusPolicy() → Qt.FocusPolicy
BasePlot.focusProxy() → QWidget
BasePlot.focusWidget() → QWidget
BasePlot.font() → QFont
BasePlot.fontInfo() → QFontInfo
BasePlot.fontMetrics() → QFontMetrics
BasePlot.foregroundRole() → QPalette.ColorRole
BasePlot.frameGeometry() → QRect
BasePlot.frameRect() → QRect
BasePlot.frameShadow() → QFrame.Shadow
BasePlot.frameShape() → QFrame.Shape
BasePlot.frameSize() → QSize
BasePlot.frameStyle() → int
BasePlot.frameWidth() → int
BasePlot.geometry() → QRect
BasePlot.getContentsMargins() -> (int, int, int, int)
BasePlot.get_active_axes()[source]

Return active axes

BasePlot.get_active_item(force=False)[source]

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

BasePlot.get_axesparam_class(item)[source]

Return AxesParam dataset class associated to item’s type

BasePlot.get_axis_color(axis_id)[source]

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

BasePlot.get_axis_font(axis_id)[source]

Get axis font

BasePlot.get_axis_id(axis_name)[source]

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

BasePlot.get_axis_limits(axis_id)[source]

Return axis limits (minimum and maximum values)

BasePlot.get_axis_scale(axis_id)[source]

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

BasePlot.get_axis_title(axis_id)[source]

Get axis title

BasePlot.get_axis_unit(axis_id)[source]

Get axis unit

BasePlot.get_context_menu()[source]

Return widget context menu

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

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

BasePlot.get_last_active_item(item_type)[source]

Return last active item corresponding to passed item_type

BasePlot.get_max_z()[source]

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

BasePlot.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

BasePlot.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)

BasePlot.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

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

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

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

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

BasePlot.get_scales()[source]

Return active curve scales

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

Return selected items

BasePlot.get_title()[source]

Get plot title

BasePlot.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
BasePlot.grabKeyboard()
BasePlot.grabMouse()

QWidget.grabMouse(QCursor)

BasePlot.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
BasePlot.graphicsEffect() → QGraphicsEffect
BasePlot.graphicsProxyWidget() → QGraphicsProxyWidget
BasePlot.handle() → int
BasePlot.hasFocus() → bool
BasePlot.hasMouseTracking() → bool
BasePlot.height() → int
BasePlot.heightForWidth(int) → int
BasePlot.heightMM() → int
BasePlot.hide()
BasePlot.hide_items(items=None, item_type=None)[source]

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

BasePlot.inherits(str) → bool
BasePlot.inputContext() → QInputContext
BasePlot.inputMethodHints() → Qt.InputMethodHints
BasePlot.inputMethodQuery(Qt.InputMethodQuery) → QVariant
BasePlot.insertAction(QAction, QAction)
BasePlot.insertActions(QAction, list-of-QAction)
BasePlot.installEventFilter(QObject)
BasePlot.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)

BasePlot.isActiveWindow() → bool
BasePlot.isAncestorOf(QWidget) → bool
BasePlot.isEnabled() → bool
BasePlot.isEnabledTo(QWidget) → bool
BasePlot.isEnabledToTLW() → bool
BasePlot.isFullScreen() → bool
BasePlot.isHidden() → bool
BasePlot.isLeftToRight() → bool
BasePlot.isMaximized() → bool
BasePlot.isMinimized() → bool
BasePlot.isModal() → bool
BasePlot.isRightToLeft() → bool
BasePlot.isTopLevel() → bool
BasePlot.isVisible() → bool
BasePlot.isVisibleTo(QWidget) → bool
BasePlot.isWidgetType() → bool
BasePlot.isWindow() → bool
BasePlot.isWindowModified() → bool
BasePlot.keyboardGrabber() → QWidget
BasePlot.killTimer(int)
BasePlot.layout() → QLayout
BasePlot.layoutDirection() → Qt.LayoutDirection
BasePlot.lineWidth() → int
BasePlot.locale() → QLocale
BasePlot.logicalDpiX() → int
BasePlot.logicalDpiY() → int
BasePlot.lower()
BasePlot.mapFrom(QWidget, QPoint) → QPoint
BasePlot.mapFromGlobal(QPoint) → QPoint
BasePlot.mapFromParent(QPoint) → QPoint
BasePlot.mapTo(QWidget, QPoint) → QPoint
BasePlot.mapToGlobal(QPoint) → QPoint
BasePlot.mapToParent(QPoint) → QPoint
BasePlot.mask() → QRegion
BasePlot.maximumHeight() → int
BasePlot.maximumSize() → QSize
BasePlot.maximumWidth() → int
BasePlot.metaObject() → QMetaObject
BasePlot.midLineWidth() → int
BasePlot.minimumHeight() → int
BasePlot.minimumSize() → QSize
BasePlot.minimumWidth() → int
BasePlot.mouseDoubleClickEvent(event)[source]

Reimplement QWidget method

BasePlot.mouseGrabber() → QWidget
BasePlot.move(QPoint)

QWidget.move(int, int)

BasePlot.moveToThread(QThread)
BasePlot.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

BasePlot.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

BasePlot.nativeParentWidget() → QWidget
BasePlot.nextInFocusChain() → QWidget
BasePlot.normalGeometry() → QRect
BasePlot.numColors() → int
BasePlot.objectName() → QString
BasePlot.overrideWindowFlags(Qt.WindowFlags)
BasePlot.overrideWindowState(Qt.WindowStates)
BasePlot.paintEngine() → QPaintEngine
BasePlot.paintingActive() → bool
BasePlot.palette() → QPalette
BasePlot.parent() → QObject
BasePlot.parentWidget() → QWidget
BasePlot.physicalDpiX() → int
BasePlot.physicalDpiY() → int
BasePlot.pos() → QPoint
BasePlot.previousInFocusChain() → QWidget
BasePlot.property(str) → QVariant
BasePlot.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.

BasePlot.raise_()
BasePlot.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

BasePlot.rect() → QRect
BasePlot.releaseKeyboard()
BasePlot.releaseMouse()
BasePlot.releaseShortcut(int)
BasePlot.removeAction(QAction)
BasePlot.removeEventFilter(QObject)
BasePlot.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)

BasePlot.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

BasePlot.resize(QSize)

QWidget.resize(int, int)

BasePlot.restoreGeometry(QByteArray) → bool
BasePlot.restore_items(iofile)[source]
Restore items from file using the pickle protocol
  • iofile: file object or filename

See also guiqwt.baseplot.BasePlot.save_items()

BasePlot.saveGeometry() → QByteArray
BasePlot.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()

BasePlot.save_widget(fname)[source]

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

BasePlot.scroll(int, int)

QWidget.scroll(int, int, QRect)

BasePlot.select_all()[source]

Select all selectable items

BasePlot.select_item(item)[source]

Select item

BasePlot.select_some_items(items)[source]

Select items

BasePlot.serialize(writer, selected=False)[source]
Save (serializable) items to HDF5 file:
  • writer: guidata.hdf5io.HDF5Writer object
  • selected=False: if True, will save only selected items

See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()

BasePlot.setAcceptDrops(bool)
BasePlot.setAccessibleDescription(QString)
BasePlot.setAccessibleName(QString)
BasePlot.setAttribute(Qt.WidgetAttribute, bool on=True)
BasePlot.setAutoFillBackground(bool)
BasePlot.setBackgroundRole(QPalette.ColorRole)
BasePlot.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

BasePlot.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

BasePlot.setContextMenuPolicy(Qt.ContextMenuPolicy)
BasePlot.setCursor(QCursor)
BasePlot.setDisabled(bool)
BasePlot.setEnabled(bool)
BasePlot.setFixedHeight(int)
BasePlot.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

BasePlot.setFixedWidth(int)
BasePlot.setFocus()

QWidget.setFocus(Qt.FocusReason)

BasePlot.setFocusPolicy(Qt.FocusPolicy)
BasePlot.setFocusProxy(QWidget)
BasePlot.setFont(QFont)
BasePlot.setForegroundRole(QPalette.ColorRole)
BasePlot.setFrameRect(QRect)
BasePlot.setFrameShadow(QFrame.Shadow)
BasePlot.setFrameShape(QFrame.Shape)
BasePlot.setFrameStyle(int)
BasePlot.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

BasePlot.setGraphicsEffect(QGraphicsEffect)
BasePlot.setHidden(bool)
BasePlot.setInputContext(QInputContext)
BasePlot.setInputMethodHints(Qt.InputMethodHints)
BasePlot.setLayout(QLayout)
BasePlot.setLayoutDirection(Qt.LayoutDirection)
BasePlot.setLineWidth(int)
BasePlot.setLocale(QLocale)
BasePlot.setMask(QBitmap)

QWidget.setMask(QRegion)

BasePlot.setMaximumHeight(int)
BasePlot.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

BasePlot.setMaximumWidth(int)
BasePlot.setMidLineWidth(int)
BasePlot.setMinimumHeight(int)
BasePlot.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

BasePlot.setMinimumWidth(int)
BasePlot.setMouseTracking(bool)
BasePlot.setObjectName(QString)
BasePlot.setPalette(QPalette)
BasePlot.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

BasePlot.setProperty(str, QVariant) → bool
BasePlot.setShortcutAutoRepeat(int, bool enabled=True)
BasePlot.setShortcutEnabled(int, bool enabled=True)
BasePlot.setShown(bool)
BasePlot.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

BasePlot.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

BasePlot.setStatusTip(QString)
BasePlot.setStyle(QStyle)
BasePlot.setStyleSheet(QString)
BasePlot.setTabOrder(QWidget, QWidget)
BasePlot.setToolTip(QString)
BasePlot.setUpdatesEnabled(bool)
BasePlot.setVisible(bool)
BasePlot.setWhatsThis(QString)
BasePlot.setWindowFilePath(QString)
BasePlot.setWindowFlags(Qt.WindowFlags)
BasePlot.setWindowIcon(QIcon)
BasePlot.setWindowIconText(QString)
BasePlot.setWindowModality(Qt.WindowModality)
BasePlot.setWindowModified(bool)
BasePlot.setWindowOpacity(float)
BasePlot.setWindowRole(QString)
BasePlot.setWindowState(Qt.WindowStates)
BasePlot.setWindowTitle(QString)
BasePlot.set_active_item(item)[source]

Set active item, and unselect the old active item

BasePlot.set_axis_color(axis_id, color)[source]

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

BasePlot.set_axis_font(axis_id, font)[source]

Set axis font

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

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

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

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

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

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

BasePlot.set_axis_title(axis_id, text)[source]

Set axis title

BasePlot.set_axis_unit(axis_id, text)[source]

Set axis unit

BasePlot.set_item_parameters(itemparams)[source]

Set item (plot, here) parameters

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

Show/hide item and emit a SIG_ITEMS_CHANGED signal

BasePlot.set_items(*args)[source]

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

BasePlot.set_items_readonly(state)[source]

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

BasePlot.set_manager(manager, plot_id)[source]

Set the associated guiqwt.plot.PlotManager instance

BasePlot.set_scales(xscale, yscale)[source]

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

BasePlot.set_title(title)[source]

Set plot title

BasePlot.show()
BasePlot.showEvent(event)[source]

Reimplement Qwt method

BasePlot.showFullScreen()
BasePlot.showMaximized()
BasePlot.showMinimized()
BasePlot.showNormal()
BasePlot.show_items(items=None, item_type=None)[source]

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

BasePlot.signalsBlocked() → bool
BasePlot.size() → QSize
BasePlot.sizeHint()[source]

Preferred size

BasePlot.sizeIncrement() → QSize
BasePlot.sizePolicy() → QSizePolicy
BasePlot.stackUnder(QWidget)
BasePlot.startTimer(int) → int
BasePlot.statusTip() → QString
BasePlot.style() → QStyle
BasePlot.styleSheet() → QString
BasePlot.testAttribute(Qt.WidgetAttribute) → bool
BasePlot.thread() → QThread
BasePlot.toolTip() → QString
BasePlot.topLevelWidget() → QWidget
BasePlot.tr(str, str disambiguation=None, int n=-1) → QString
BasePlot.trUtf8(str, str disambiguation=None, int n=-1) → QString
BasePlot.underMouse() → bool
BasePlot.ungrabGesture(Qt.GestureType)
BasePlot.unselect_all()[source]

Unselect all selected items

BasePlot.unselect_item(item)[source]

Unselect item

BasePlot.unsetCursor()
BasePlot.unsetLayoutDirection()
BasePlot.unsetLocale()
BasePlot.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

BasePlot.updateGeometry()
BasePlot.update_all_axes_styles()[source]

Update all axes styles

BasePlot.update_axis_style(axis_id)[source]

Update axis style

BasePlot.updatesEnabled() → bool
BasePlot.visibleRegion() → QRegion
BasePlot.whatsThis() → QString
BasePlot.width() → int
BasePlot.widthMM() → int
BasePlot.winId() → int
BasePlot.window() → QWidget
BasePlot.windowFilePath() → QString
BasePlot.windowFlags() → Qt.WindowFlags
BasePlot.windowIcon() → QIcon
BasePlot.windowIconText() → QString
BasePlot.windowModality() → Qt.WindowModality
BasePlot.windowOpacity() → float
BasePlot.windowRole() → QString
BasePlot.windowState() → Qt.WindowStates
BasePlot.windowTitle() → QString
BasePlot.windowType() → Qt.WindowType
BasePlot.x() → int
BasePlot.x11Info() → QX11Info
BasePlot.x11PictureHandle() → int
BasePlot.y() → int

guiqwt.curve

The curve module provides curve-related objects:

CurveItem and GridItem objects are plot items (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.

See also

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

Examples

Create a basic curve plotting widget:
  • before creating any widget, a QApplication must be instantiated (that is a Qt internal requirement):
>>> import guidata
>>> app = guidata.qapplication()
  • that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):
>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])
  • now that a QApplication object exists, we may create the plotting widget:
>>> from guiqwt.curve import CurvePlot
>>> plot = CurvePlot(title="Example", xlabel="X", ylabel="Y")
Create a curve item:
  • from the associated plot item class (e.g. ErrorBarCurveItem to create a curve with error bars): the item properties are then assigned by creating the appropriate style parameters object (e.g. guiqwt.styles.ErrorBarParam)
>>> from guiqwt.curve import CurveItem
>>> from guiqwt.styles import CurveParam
>>> param = CurveParam()
>>> param.label = 'My curve'
>>> curve = CurveItem(param)
>>> curve.set_data(x, y)
  • or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> curve = make.curve(x, y, title='My curve')

Attach the curve to the plotting widget:

>>> plot.add_item(curve)

Display the plotting widget:

>>> plot.show()
>>> app.exec_()

Reference

class guiqwt.curve.CurvePlot(parent=None, title=None, xlabel=None, ylabel=None, xunit=None, yunit=None, gridparam=None, section='plot', axes_synchronised=False)[source]

Construct a 2D curve plotting widget (this class inherits guiqwt.baseplot.BasePlot)

  • parent: parent widget

  • 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

  • gridparam: GridParam instance

  • axes_synchronised: keep all x and y axes synchronised when zomming or

    panning

DEFAULT_ITEM_TYPE

alias of ICurveItemType

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

CurvePlot.acceptDrops() → bool
CurvePlot.accessibleDescription() → QString
CurvePlot.accessibleName() → QString
CurvePlot.actions() → list-of-QAction
CurvePlot.activateWindow()
CurvePlot.addAction(QAction)
CurvePlot.addActions(list-of-QAction)
CurvePlot.add_item(item, z=None)[source]

Add a plot item instance to this plot widget * item: QwtPlotItem (PyQt4.Qwt5) object implementing

the IBasePlotItem interface (guiqwt.interfaces)
  • z: item’s z order (None -> z = max(self.get_items())+1)
CurvePlot.add_item_with_z_offset(item, zoffset)

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

CurvePlot.adjustSize()
CurvePlot.autoFillBackground() → bool
CurvePlot.backgroundRole() → QPalette.ColorRole
CurvePlot.baseSize() → QSize
CurvePlot.blockSignals(bool) → bool
CurvePlot.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

CurvePlot.children() → list-of-QObject
CurvePlot.childrenRect() → QRect
CurvePlot.childrenRegion() → QRegion
CurvePlot.clearFocus()
CurvePlot.clearMask()
CurvePlot.close() → bool
CurvePlot.colorCount() → int
CurvePlot.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

CurvePlot.contentsMargins() → QMargins
CurvePlot.contentsRect() → QRect
CurvePlot.contextMenuPolicy() → Qt.ContextMenuPolicy
CurvePlot.copy_to_clipboard()

Copy widget’s window to clipboard

CurvePlot.cursor() → QCursor
CurvePlot.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

CurvePlot.del_all_items(except_grid=True)[source]

Del all items, eventually (default) except grid

CurvePlot.del_item(item)

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

CurvePlot.del_items(items)

Remove item from widget

CurvePlot.deleteLater()
CurvePlot.depth() → int
CurvePlot.deserialize(reader)
Restore items from HDF5 file:
  • reader: guidata.hdf5io.HDF5Reader object

See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()

CurvePlot.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

CurvePlot.devType() → int
CurvePlot.disable_autoscale()

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

CurvePlot.disable_unused_axes()

Disable unused axes

CurvePlot.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

CurvePlot.do_autoscale(replot=True)[source]

Do autoscale on all axes

CurvePlot.do_pan_view(dx, dy)[source]

Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)

CurvePlot.do_zoom_view(dx, dy, lock_aspect_ratio=False)[source]

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

CurvePlot.dumpObjectInfo()
CurvePlot.dumpObjectTree()
CurvePlot.dynamicPropertyNames() → list-of-QByteArray
CurvePlot.edit_axis_parameters(axis_id)

Edit axis parameters

CurvePlot.edit_plot_parameters(key)

Edit plot parameters

CurvePlot.effectiveWinId() → int
CurvePlot.emit(SIGNAL(), ...)
CurvePlot.enable_used_axes()

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

CurvePlot.ensurePolished()
CurvePlot.eventFilter(QObject, QEvent) → bool
CurvePlot.find(int) → QWidget
CurvePlot.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

CurvePlot.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

CurvePlot.focusPolicy() → Qt.FocusPolicy
CurvePlot.focusProxy() → QWidget
CurvePlot.focusWidget() → QWidget
CurvePlot.font() → QFont
CurvePlot.fontInfo() → QFontInfo
CurvePlot.fontMetrics() → QFontMetrics
CurvePlot.foregroundRole() → QPalette.ColorRole
CurvePlot.frameGeometry() → QRect
CurvePlot.frameRect() → QRect
CurvePlot.frameShadow() → QFrame.Shadow
CurvePlot.frameShape() → QFrame.Shape
CurvePlot.frameSize() → QSize
CurvePlot.frameStyle() → int
CurvePlot.frameWidth() → int
CurvePlot.geometry() → QRect
CurvePlot.getContentsMargins() -> (int, int, int, int)
CurvePlot.get_active_axes()

Return active axes

CurvePlot.get_active_item(force=False)

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

CurvePlot.get_axesparam_class(item)

Return AxesParam dataset class associated to item’s type

CurvePlot.get_axis_color(axis_id)

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

CurvePlot.get_axis_direction(axis_id)[source]

Return axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)

or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
CurvePlot.get_axis_font(axis_id)

Get axis font

CurvePlot.get_axis_id(axis_name)

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

CurvePlot.get_axis_limits(axis_id)

Return axis limits (minimum and maximum values)

CurvePlot.get_axis_scale(axis_id)

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

CurvePlot.get_axis_title(axis_id)

Get axis title

CurvePlot.get_axis_unit(axis_id)

Get axis unit

CurvePlot.get_context_menu()

Return widget context menu

CurvePlot.get_default_item()[source]

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.

CurvePlot.get_items(z_sorted=False, item_type=None)

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

CurvePlot.get_last_active_item(item_type)

Return last active item corresponding to passed item_type

CurvePlot.get_max_z()

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

CurvePlot.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_dist

else: return the closest item

CurvePlot.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)

CurvePlot.get_plot_limits(xaxis='bottom', yaxis='left')[source]

Return plot scale limits

CurvePlot.get_private_items(z_sorted=False, item_type=None)

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

CurvePlot.get_public_items(z_sorted=False, item_type=None)

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

CurvePlot.get_scales()

Return active curve scales

CurvePlot.get_selected_items(z_sorted=False, item_type=None)

Return selected items

CurvePlot.get_title()

Get plot title

CurvePlot.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
CurvePlot.grabKeyboard()
CurvePlot.grabMouse()

QWidget.grabMouse(QCursor)

CurvePlot.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
CurvePlot.graphicsEffect() → QGraphicsEffect
CurvePlot.graphicsProxyWidget() → QGraphicsProxyWidget
CurvePlot.handle() → int
CurvePlot.hasFocus() → bool
CurvePlot.hasMouseTracking() → bool
CurvePlot.height() → int
CurvePlot.heightForWidth(int) → int
CurvePlot.heightMM() → int
CurvePlot.hide()
CurvePlot.hide_items(items=None, item_type=None)

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

CurvePlot.inherits(str) → bool
CurvePlot.inputContext() → QInputContext
CurvePlot.inputMethodHints() → Qt.InputMethodHints
CurvePlot.inputMethodQuery(Qt.InputMethodQuery) → QVariant
CurvePlot.insertAction(QAction, QAction)
CurvePlot.insertActions(QAction, list-of-QAction)
CurvePlot.installEventFilter(QObject)
CurvePlot.invalidate()

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

CurvePlot.isActiveWindow() → bool
CurvePlot.isAncestorOf(QWidget) → bool
CurvePlot.isEnabled() → bool
CurvePlot.isEnabledTo(QWidget) → bool
CurvePlot.isEnabledToTLW() → bool
CurvePlot.isFullScreen() → bool
CurvePlot.isHidden() → bool
CurvePlot.isLeftToRight() → bool
CurvePlot.isMaximized() → bool
CurvePlot.isMinimized() → bool
CurvePlot.isModal() → bool
CurvePlot.isRightToLeft() → bool
CurvePlot.isTopLevel() → bool
CurvePlot.isVisible() → bool
CurvePlot.isVisibleTo(QWidget) → bool
CurvePlot.isWidgetType() → bool
CurvePlot.isWindow() → bool
CurvePlot.isWindowModified() → bool
CurvePlot.keyboardGrabber() → QWidget
CurvePlot.killTimer(int)
CurvePlot.layout() → QLayout
CurvePlot.layoutDirection() → Qt.LayoutDirection
CurvePlot.lineWidth() → int
CurvePlot.locale() → QLocale
CurvePlot.logicalDpiX() → int
CurvePlot.logicalDpiY() → int
CurvePlot.lower()
CurvePlot.mapFrom(QWidget, QPoint) → QPoint
CurvePlot.mapFromGlobal(QPoint) → QPoint
CurvePlot.mapFromParent(QPoint) → QPoint
CurvePlot.mapTo(QWidget, QPoint) → QPoint
CurvePlot.mapToGlobal(QPoint) → QPoint
CurvePlot.mapToParent(QPoint) → QPoint
CurvePlot.mask() → QRegion
CurvePlot.maximumHeight() → int
CurvePlot.maximumSize() → QSize
CurvePlot.maximumWidth() → int
CurvePlot.metaObject() → QMetaObject
CurvePlot.midLineWidth() → int
CurvePlot.minimumHeight() → int
CurvePlot.minimumSize() → QSize
CurvePlot.minimumWidth() → int
CurvePlot.mouseDoubleClickEvent(event)

Reimplement QWidget method

CurvePlot.mouseGrabber() → QWidget
CurvePlot.move(QPoint)

QWidget.move(int, int)

CurvePlot.moveToThread(QThread)
CurvePlot.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

CurvePlot.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

CurvePlot.nativeParentWidget() → QWidget
CurvePlot.nextInFocusChain() → QWidget
CurvePlot.normalGeometry() → QRect
CurvePlot.numColors() → int
CurvePlot.objectName() → QString
CurvePlot.overrideWindowFlags(Qt.WindowFlags)
CurvePlot.overrideWindowState(Qt.WindowStates)
CurvePlot.paintEngine() → QPaintEngine
CurvePlot.paintingActive() → bool
CurvePlot.palette() → QPalette
CurvePlot.parent() → QObject
CurvePlot.parentWidget() → QWidget
CurvePlot.physicalDpiX() → int
CurvePlot.physicalDpiY() → int
CurvePlot.pos() → QPoint
CurvePlot.previousInFocusChain() → QWidget
CurvePlot.property(str) → QVariant
CurvePlot.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.

CurvePlot.raise_()
CurvePlot.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

CurvePlot.rect() → QRect
CurvePlot.releaseKeyboard()
CurvePlot.releaseMouse()
CurvePlot.releaseShortcut(int)
CurvePlot.removeAction(QAction)
CurvePlot.removeEventFilter(QObject)
CurvePlot.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)

CurvePlot.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

CurvePlot.resize(QSize)

QWidget.resize(int, int)

CurvePlot.restoreGeometry(QByteArray) → bool
CurvePlot.restore_items(iofile)
Restore items from file using the pickle protocol
  • iofile: file object or filename

See also guiqwt.baseplot.BasePlot.save_items()

CurvePlot.saveGeometry() → QByteArray
CurvePlot.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

See also guiqwt.baseplot.BasePlot.restore_items()

CurvePlot.save_widget(fname)

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

CurvePlot.scroll(int, int)

QWidget.scroll(int, int, QRect)

CurvePlot.select_all()

Select all selectable items

CurvePlot.select_item(item)

Select item

CurvePlot.select_some_items(items)

Select items

CurvePlot.serialize(writer, selected=False)
Save (serializable) items to HDF5 file:
  • writer: guidata.hdf5io.HDF5Writer object
  • selected=False: if True, will save only selected items

See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()

CurvePlot.setAcceptDrops(bool)
CurvePlot.setAccessibleDescription(QString)
CurvePlot.setAccessibleName(QString)
CurvePlot.setAttribute(Qt.WidgetAttribute, bool on=True)
CurvePlot.setAutoFillBackground(bool)
CurvePlot.setBackgroundRole(QPalette.ColorRole)
CurvePlot.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

CurvePlot.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

CurvePlot.setContextMenuPolicy(Qt.ContextMenuPolicy)
CurvePlot.setCursor(QCursor)
CurvePlot.setDisabled(bool)
CurvePlot.setEnabled(bool)
CurvePlot.setFixedHeight(int)
CurvePlot.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

CurvePlot.setFixedWidth(int)
CurvePlot.setFocus()

QWidget.setFocus(Qt.FocusReason)

CurvePlot.setFocusPolicy(Qt.FocusPolicy)
CurvePlot.setFocusProxy(QWidget)
CurvePlot.setFont(QFont)
CurvePlot.setForegroundRole(QPalette.ColorRole)
CurvePlot.setFrameRect(QRect)
CurvePlot.setFrameShadow(QFrame.Shadow)
CurvePlot.setFrameShape(QFrame.Shape)
CurvePlot.setFrameStyle(int)
CurvePlot.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

CurvePlot.setGraphicsEffect(QGraphicsEffect)
CurvePlot.setHidden(bool)
CurvePlot.setInputContext(QInputContext)
CurvePlot.setInputMethodHints(Qt.InputMethodHints)
CurvePlot.setLayout(QLayout)
CurvePlot.setLayoutDirection(Qt.LayoutDirection)
CurvePlot.setLineWidth(int)
CurvePlot.setLocale(QLocale)
CurvePlot.setMask(QBitmap)

QWidget.setMask(QRegion)

CurvePlot.setMaximumHeight(int)
CurvePlot.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

CurvePlot.setMaximumWidth(int)
CurvePlot.setMidLineWidth(int)
CurvePlot.setMinimumHeight(int)
CurvePlot.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

CurvePlot.setMinimumWidth(int)
CurvePlot.setMouseTracking(bool)
CurvePlot.setObjectName(QString)
CurvePlot.setPalette(QPalette)
CurvePlot.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

CurvePlot.setProperty(str, QVariant) → bool
CurvePlot.setShortcutAutoRepeat(int, bool enabled=True)
CurvePlot.setShortcutEnabled(int, bool enabled=True)
CurvePlot.setShown(bool)
CurvePlot.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

CurvePlot.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

CurvePlot.setStatusTip(QString)
CurvePlot.setStyle(QStyle)
CurvePlot.setStyleSheet(QString)
CurvePlot.setTabOrder(QWidget, QWidget)
CurvePlot.setToolTip(QString)
CurvePlot.setUpdatesEnabled(bool)
CurvePlot.setVisible(bool)
CurvePlot.setWhatsThis(QString)
CurvePlot.setWindowFilePath(QString)
CurvePlot.setWindowFlags(Qt.WindowFlags)
CurvePlot.setWindowIcon(QIcon)
CurvePlot.setWindowIconText(QString)
CurvePlot.setWindowModality(Qt.WindowModality)
CurvePlot.setWindowModified(bool)
CurvePlot.setWindowOpacity(float)
CurvePlot.setWindowRole(QString)
CurvePlot.setWindowState(Qt.WindowStates)
CurvePlot.setWindowTitle(QString)
CurvePlot.set_active_item(item)[source]

Override base set_active_item to change the grid’s axes according to the selected item

CurvePlot.set_antialiasing(checked)[source]

Toggle curve antialiasing

CurvePlot.set_axis_color(axis_id, color)

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

CurvePlot.set_axis_direction(axis_id, reverse=False)[source]

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
CurvePlot.set_axis_font(axis_id, font)

Set axis font

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

Set axis limits (minimum and maximum values)

CurvePlot.set_axis_scale(axis_id, scale, autoscale=True)

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

CurvePlot.set_axis_ticks(axis_id, nmajor=None, nminor=None)

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

CurvePlot.set_axis_title(axis_id, text)

Set axis title

CurvePlot.set_axis_unit(axis_id, text)

Set axis unit

CurvePlot.set_item_visible(item, state, notify=True, replot=True)

Show/hide item and emit a SIG_ITEMS_CHANGED signal

CurvePlot.set_items(*args)

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

CurvePlot.set_items_readonly(state)

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

CurvePlot.set_manager(manager, plot_id)

Set the associated guiqwt.plot.PlotManager instance

CurvePlot.set_plot_limits(x0, x1, y0, y1, xaxis='bottom', yaxis='left')[source]

Set plot scale limits

CurvePlot.set_pointer(pointer_type)[source]

Set pointer. Valid values of pointer_type:

  • None: disable pointer
  • “canvas”: enable canvas pointer
  • “curve”: enable on-curve pointer
CurvePlot.set_scales(xscale, yscale)

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

CurvePlot.set_title(title)

Set plot title

CurvePlot.set_titles(title=None, xlabel=None, ylabel=None, xunit=None, yunit=None)[source]

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
CurvePlot.show()
CurvePlot.showEvent(event)

Reimplement Qwt method

CurvePlot.showFullScreen()
CurvePlot.showMaximized()
CurvePlot.showMinimized()
CurvePlot.showNormal()
CurvePlot.show_items(items=None, item_type=None)

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

CurvePlot.signalsBlocked() → bool
CurvePlot.size() → QSize
CurvePlot.sizeHint()

Preferred size

CurvePlot.sizeIncrement() → QSize
CurvePlot.sizePolicy() → QSizePolicy
CurvePlot.stackUnder(QWidget)
CurvePlot.startTimer(int) → int
CurvePlot.statusTip() → QString
CurvePlot.style() → QStyle
CurvePlot.styleSheet() → QString
CurvePlot.testAttribute(Qt.WidgetAttribute) → bool
CurvePlot.thread() → QThread
CurvePlot.toolTip() → QString
CurvePlot.topLevelWidget() → QWidget
CurvePlot.tr(str, str disambiguation=None, int n=-1) → QString
CurvePlot.trUtf8(str, str disambiguation=None, int n=-1) → QString
CurvePlot.underMouse() → bool
CurvePlot.ungrabGesture(Qt.GestureType)
CurvePlot.unselect_all()

Unselect all selected items

CurvePlot.unselect_item(item)

Unselect item

CurvePlot.unsetCursor()
CurvePlot.unsetLayoutDirection()
CurvePlot.unsetLocale()
CurvePlot.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

CurvePlot.updateGeometry()
CurvePlot.update_all_axes_styles()

Update all axes styles

CurvePlot.update_axis_style(axis_id)

Update axis style

CurvePlot.updatesEnabled() → bool
CurvePlot.visibleRegion() → QRegion
CurvePlot.whatsThis() → QString
CurvePlot.width() → int
CurvePlot.widthMM() → int
CurvePlot.winId() → int
CurvePlot.window() → QWidget
CurvePlot.windowFilePath() → QString
CurvePlot.windowFlags() → Qt.WindowFlags
CurvePlot.windowIcon() → QIcon
CurvePlot.windowIconText() → QString
CurvePlot.windowModality() → Qt.WindowModality
CurvePlot.windowOpacity() → float
CurvePlot.windowRole() → QString
CurvePlot.windowState() → Qt.WindowStates
CurvePlot.windowTitle() → QString
CurvePlot.windowType() → Qt.WindowType
CurvePlot.x() → int
CurvePlot.x11Info() → QX11Info
CurvePlot.x11PictureHandle() → int
CurvePlot.y() → int
class guiqwt.curve.CurveItem(curveparam=None)[source]

Construct a curve plot item with the parameters curveparam (see guiqwt.styles.CurveParam)

boundingRect()[source]

Return the bounding rectangle of the data

deserialize(reader)[source]

Deserialize object from HDF5 reader

get_closest_coordinates(x, y)[source]

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()[source]

Return curve data x, y (NumPy arrays)

hit_test(pos)[source]

Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)

is_empty()[source]

Return True if item data is empty

is_private()[source]

Return True if object is private

is_readonly()[source]

Return object readonly state

move_local_shape(old_pos, new_pos)[source]

Translate the shape such that old_pos becomes new_pos in canvas coordinates

move_with_selection(delta_x, delta_y)[source]

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()[source]

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(x, y)[source]

Set curve data: * x: NumPy array * y: NumPy array

set_movable(state)[source]

Set item movable state

set_private(state)[source]

Set object as private

set_readonly(state)[source]

Set object readonly state

set_resizable(state)[source]

Set item resizable state (or any action triggered when moving an handle, e.g. rotation)

set_rotatable(state)[source]

Set item rotatable state

set_selectable(state)[source]

Set item selectable state

unselect()[source]

Unselect item

class guiqwt.curve.ErrorBarCurveItem(curveparam=None, errorbarparam=None)[source]

Construct an error-bar curve plot item with the parameters errorbarparam (see guiqwt.styles.ErrorBarParam)

boundingRect()[source]

Return the bounding rectangle of the data, error bars included

deserialize(reader)[source]

Deserialize object from HDF5 reader

get_data()[source]

Return error-bar curve data: x, y, dx, dy * x: NumPy array * y: NumPy array * dx: float or NumPy array (non-constant error bars) * dy: float or NumPy array (non-constant error bars)

hit_test(pos)

Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(x, y, dx=None, dy=None)[source]

Set error-bar curve data: * x: NumPy array * y: NumPy array * dx: float or NumPy array (non-constant error bars) * dy: float or NumPy array (non-constant error bars)

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

unselect()[source]

Unselect item

class guiqwt.curve.PlotItemList(parent)[source]

Construct the plot item list panel

configure_panel()[source]

Configure panel

register_panel(manager)[source]

Register panel to plot manager

guiqwt.image

The image module provides image-related objects and functions:

ImageItem, TrImageItem, XYImageItem, Histogram2DItem and ImageFilterItem objects are plot items (derived from QwtPlotItem) that may be displayed on a guiqwt.image.ImagePlot plotting widget.

See also

Module guiqwt.curve
Module providing curve-related plot items and plotting widgets
Module guiqwt.plot
Module providing ready-to-use curve and image plotting widgets and dialog boxes

Examples

Create a basic image plotting widget:
  • before creating any widget, a QApplication must be instantiated (that is a Qt internal requirement):
>>> import guidata
>>> app = guidata.qapplication()
  • that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):
>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])
  • now that a QApplication object exists, we may create the plotting widget:
>>> from guiqwt.image import ImagePlot
>>> plot = ImagePlot(title="Example")

Generate random data for testing purpose:

>>> import numpy as np
>>> data = np.random.rand(100, 100)
Create a simple image item:
  • from the associated plot item class (e.g. XYImageItem to create an image with non-linear X/Y axes): the item properties are then assigned by creating the appropriate style parameters object (e.g. :py:class:`guiqwt.styles.ImageParam)
>>> from guiqwt.curve import ImageItem
>>> from guiqwt.styles import ImageParam
>>> param = ImageParam()
>>> param.label = 'My image'
>>> image = ImageItem(param)
>>> image.set_data(data)
  • or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> image = make.image(data, title='My image')

Attach the image to the plotting widget:

>>> plot.add_item(image)

Display the plotting widget:

>>> plot.show()
>>> app.exec_()

Reference

class guiqwt.image.ImagePlot(parent=None, title=None, xlabel=None, ylabel=None, zlabel=None, xunit=None, yunit=None, zunit=None, yreverse=True, aspect_ratio=1.0, lock_aspect_ratio=True, gridparam=None, section=u'plot')[source]

Construct a 2D curve and image plotting widget (this class inherits guiqwt.curve.CurvePlot)

  • parent: parent widget
  • title: plot title (string)
  • xlabel, ylabel, zlabel: resp. bottom, left and right axis titles (strings)
  • xunit, yunit, zunit: resp. bottom, left and right axis units (strings)
  • yreverse: reversing y-axis direction of increasing values (bool)
  • aspect_ratio: height to width ratio (float)
  • lock_aspect_ratio: locking aspect ratio (bool)
DEFAULT_ITEM_TYPE

alias of IImageItemType

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

ImagePlot.acceptDrops() → bool
ImagePlot.accessibleDescription() → QString
ImagePlot.accessibleName() → QString
ImagePlot.actions() → list-of-QAction
ImagePlot.activateWindow()
ImagePlot.addAction(QAction)
ImagePlot.addActions(list-of-QAction)
ImagePlot.add_item(item, z=None, autoscale=True)[source]

Add a plot item instance to this plot widget

item: QwtPlotItem (PyQt4.Qwt5) object implementing
the IBasePlotItem interface (guiqwt.interfaces)

z: item’s z order (None -> z = max(self.get_items())+1) autoscale: True -> rescale plot to fit image bounds

ImagePlot.add_item_with_z_offset(item, zoffset)

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

ImagePlot.adjustSize()
ImagePlot.autoFillBackground() → bool
ImagePlot.backgroundRole() → QPalette.ColorRole
ImagePlot.baseSize() → QSize
ImagePlot.blockSignals(bool) → bool
ImagePlot.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

ImagePlot.children() → list-of-QObject
ImagePlot.childrenRect() → QRect
ImagePlot.childrenRegion() → QRegion
ImagePlot.clearFocus()
ImagePlot.clearMask()
ImagePlot.close() → bool
ImagePlot.colorCount() → int
ImagePlot.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

ImagePlot.contentsMargins() → QMargins
ImagePlot.contentsRect() → QRect
ImagePlot.contextMenuPolicy() → Qt.ContextMenuPolicy
ImagePlot.copy_to_clipboard()

Copy widget’s window to clipboard

ImagePlot.cursor() → QCursor
ImagePlot.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

ImagePlot.del_all_items(except_grid=True)

Del all items, eventually (default) except grid

ImagePlot.del_item(item)

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

ImagePlot.del_items(items)

Remove item from widget

ImagePlot.deleteLater()
ImagePlot.depth() → int
ImagePlot.deserialize(reader)
Restore items from HDF5 file:
  • reader: guidata.hdf5io.HDF5Reader object

See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()

ImagePlot.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

ImagePlot.devType() → int
ImagePlot.disable_autoscale()

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

ImagePlot.disable_unused_axes()

Disable unused axes

ImagePlot.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

ImagePlot.do_autoscale(replot=True)[source]

Do autoscale on all axes

ImagePlot.do_pan_view(dx, dy)

Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)

ImagePlot.do_zoom_view(dx, dy)[source]

Reimplement CurvePlot method

ImagePlot.dumpObjectInfo()
ImagePlot.dumpObjectTree()
ImagePlot.dynamicPropertyNames() → list-of-QByteArray
ImagePlot.edit_axis_parameters(axis_id)[source]

Edit axis parameters

ImagePlot.edit_plot_parameters(key)

Edit plot parameters

ImagePlot.effectiveWinId() → int
ImagePlot.emit(SIGNAL(), ...)
ImagePlot.enable_used_axes()

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

ImagePlot.ensurePolished()
ImagePlot.eventFilter(QObject, QEvent) → bool
ImagePlot.find(int) → QWidget
ImagePlot.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

ImagePlot.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

ImagePlot.focusPolicy() → Qt.FocusPolicy
ImagePlot.focusProxy() → QWidget
ImagePlot.focusWidget() → QWidget
ImagePlot.font() → QFont
ImagePlot.fontInfo() → QFontInfo
ImagePlot.fontMetrics() → QFontMetrics
ImagePlot.foregroundRole() → QPalette.ColorRole
ImagePlot.frameGeometry() → QRect
ImagePlot.frameRect() → QRect
ImagePlot.frameShadow() → QFrame.Shadow
ImagePlot.frameShape() → QFrame.Shape
ImagePlot.frameSize() → QSize
ImagePlot.frameStyle() → int
ImagePlot.frameWidth() → int
ImagePlot.geometry() → QRect
ImagePlot.getContentsMargins() -> (int, int, int, int)
ImagePlot.get_active_axes()

Return active axes

ImagePlot.get_active_item(force=False)

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

ImagePlot.get_aspect_ratio()[source]

Return aspect ratio

ImagePlot.get_axesparam_class(item)[source]

Return AxesParam dataset class associated to item’s type

ImagePlot.get_axis_color(axis_id)

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

ImagePlot.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’
ImagePlot.get_axis_font(axis_id)

Get axis font

ImagePlot.get_axis_id(axis_name)

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

ImagePlot.get_axis_limits(axis_id)

Return axis limits (minimum and maximum values)

ImagePlot.get_axis_scale(axis_id)

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

ImagePlot.get_axis_title(axis_id)

Get axis title

ImagePlot.get_axis_unit(axis_id)

Get axis unit

ImagePlot.get_context_menu()

Return widget context menu

ImagePlot.get_current_aspect_ratio()[source]

Return current aspect ratio

ImagePlot.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.

ImagePlot.get_items(z_sorted=False, item_type=None)

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

ImagePlot.get_last_active_item(item_type)

Return last active item corresponding to passed item_type

ImagePlot.get_max_z()

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

ImagePlot.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_dist

else: return the closest item

ImagePlot.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)

ImagePlot.get_plot_limits(xaxis='bottom', yaxis='left')

Return plot scale limits

ImagePlot.get_private_items(z_sorted=False, item_type=None)

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

ImagePlot.get_public_items(z_sorted=False, item_type=None)

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

ImagePlot.get_scales()

Return active curve scales

ImagePlot.get_selected_items(z_sorted=False, item_type=None)

Return selected items

ImagePlot.get_title()

Get plot title

ImagePlot.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
ImagePlot.grabKeyboard()
ImagePlot.grabMouse()

QWidget.grabMouse(QCursor)

ImagePlot.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
ImagePlot.graphicsEffect() → QGraphicsEffect
ImagePlot.graphicsProxyWidget() → QGraphicsProxyWidget
ImagePlot.handle() → int
ImagePlot.hasFocus() → bool
ImagePlot.hasMouseTracking() → bool
ImagePlot.height() → int
ImagePlot.heightForWidth(int) → int
ImagePlot.heightMM() → int
ImagePlot.hide()
ImagePlot.hide_items(items=None, item_type=None)

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

ImagePlot.inherits(str) → bool
ImagePlot.inputContext() → QInputContext
ImagePlot.inputMethodHints() → Qt.InputMethodHints
ImagePlot.inputMethodQuery(Qt.InputMethodQuery) → QVariant
ImagePlot.insertAction(QAction, QAction)
ImagePlot.insertActions(QAction, list-of-QAction)
ImagePlot.installEventFilter(QObject)
ImagePlot.invalidate()

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

ImagePlot.isActiveWindow() → bool
ImagePlot.isAncestorOf(QWidget) → bool
ImagePlot.isEnabled() → bool
ImagePlot.isEnabledTo(QWidget) → bool
ImagePlot.isEnabledToTLW() → bool
ImagePlot.isFullScreen() → bool
ImagePlot.isHidden() → bool
ImagePlot.isLeftToRight() → bool
ImagePlot.isMaximized() → bool
ImagePlot.isMinimized() → bool
ImagePlot.isModal() → bool
ImagePlot.isRightToLeft() → bool
ImagePlot.isTopLevel() → bool
ImagePlot.isVisible() → bool
ImagePlot.isVisibleTo(QWidget) → bool
ImagePlot.isWidgetType() → bool
ImagePlot.isWindow() → bool
ImagePlot.isWindowModified() → bool
ImagePlot.keyboardGrabber() → QWidget
ImagePlot.killTimer(int)
ImagePlot.layout() → QLayout
ImagePlot.layoutDirection() → Qt.LayoutDirection
ImagePlot.lineWidth() → int
ImagePlot.locale() → QLocale
ImagePlot.logicalDpiX() → int
ImagePlot.logicalDpiY() → int
ImagePlot.lower()
ImagePlot.mapFrom(QWidget, QPoint) → QPoint
ImagePlot.mapFromGlobal(QPoint) → QPoint
ImagePlot.mapFromParent(QPoint) → QPoint
ImagePlot.mapTo(QWidget, QPoint) → QPoint
ImagePlot.mapToGlobal(QPoint) → QPoint
ImagePlot.mapToParent(QPoint) → QPoint
ImagePlot.mask() → QRegion
ImagePlot.maximumHeight() → int
ImagePlot.maximumSize() → QSize
ImagePlot.maximumWidth() → int
ImagePlot.metaObject() → QMetaObject
ImagePlot.midLineWidth() → int
ImagePlot.minimumHeight() → int
ImagePlot.minimumSize() → QSize
ImagePlot.minimumWidth() → int
ImagePlot.mouseDoubleClickEvent(event)

Reimplement QWidget method

ImagePlot.mouseGrabber() → QWidget
ImagePlot.move(QPoint)

QWidget.move(int, int)

ImagePlot.moveToThread(QThread)
ImagePlot.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

ImagePlot.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

ImagePlot.nativeParentWidget() → QWidget
ImagePlot.nextInFocusChain() → QWidget
ImagePlot.normalGeometry() → QRect
ImagePlot.notify_colormap_changed()[source]

Levels histogram range has changed

ImagePlot.numColors() → int
ImagePlot.objectName() → QString
ImagePlot.overrideWindowFlags(Qt.WindowFlags)
ImagePlot.overrideWindowState(Qt.WindowStates)
ImagePlot.paintEngine() → QPaintEngine
ImagePlot.paintingActive() → bool
ImagePlot.palette() → QPalette
ImagePlot.parent() → QObject
ImagePlot.parentWidget() → QWidget
ImagePlot.physicalDpiX() → int
ImagePlot.physicalDpiY() → int
ImagePlot.pos() → QPoint
ImagePlot.previousInFocusChain() → QWidget
ImagePlot.property(str) → QVariant
ImagePlot.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.

ImagePlot.raise_()
ImagePlot.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

ImagePlot.rect() → QRect
ImagePlot.releaseKeyboard()
ImagePlot.releaseMouse()
ImagePlot.releaseShortcut(int)
ImagePlot.removeAction(QAction)
ImagePlot.removeEventFilter(QObject)
ImagePlot.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)

ImagePlot.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

ImagePlot.resize(QSize)

QWidget.resize(int, int)

ImagePlot.resizeEvent(event)[source]

Reimplement Qt method to resize widget

ImagePlot.restoreGeometry(QByteArray) → bool
ImagePlot.restore_items(iofile)
Restore items from file using the pickle protocol
  • iofile: file object or filename

See also guiqwt.baseplot.BasePlot.save_items()

ImagePlot.saveGeometry() → QByteArray
ImagePlot.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

See also guiqwt.baseplot.BasePlot.restore_items()

ImagePlot.save_widget(fname)

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

ImagePlot.scroll(int, int)

QWidget.scroll(int, int, QRect)

ImagePlot.select_all()

Select all selectable items

ImagePlot.select_item(item)

Select item

ImagePlot.select_some_items(items)

Select items

ImagePlot.serialize(writer, selected=False)
Save (serializable) items to HDF5 file:
  • writer: guidata.hdf5io.HDF5Writer object
  • selected=False: if True, will save only selected items

See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()

ImagePlot.setAcceptDrops(bool)
ImagePlot.setAccessibleDescription(QString)
ImagePlot.setAccessibleName(QString)
ImagePlot.setAttribute(Qt.WidgetAttribute, bool on=True)
ImagePlot.setAutoFillBackground(bool)
ImagePlot.setBackgroundRole(QPalette.ColorRole)
ImagePlot.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

ImagePlot.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

ImagePlot.setContextMenuPolicy(Qt.ContextMenuPolicy)
ImagePlot.setCursor(QCursor)
ImagePlot.setDisabled(bool)
ImagePlot.setEnabled(bool)
ImagePlot.setFixedHeight(int)
ImagePlot.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

ImagePlot.setFixedWidth(int)
ImagePlot.setFocus()

QWidget.setFocus(Qt.FocusReason)

ImagePlot.setFocusPolicy(Qt.FocusPolicy)
ImagePlot.setFocusProxy(QWidget)
ImagePlot.setFont(QFont)
ImagePlot.setForegroundRole(QPalette.ColorRole)
ImagePlot.setFrameRect(QRect)
ImagePlot.setFrameShadow(QFrame.Shadow)
ImagePlot.setFrameShape(QFrame.Shape)
ImagePlot.setFrameStyle(int)
ImagePlot.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

ImagePlot.setGraphicsEffect(QGraphicsEffect)
ImagePlot.setHidden(bool)
ImagePlot.setInputContext(QInputContext)
ImagePlot.setInputMethodHints(Qt.InputMethodHints)
ImagePlot.setLayout(QLayout)
ImagePlot.setLayoutDirection(Qt.LayoutDirection)
ImagePlot.setLineWidth(int)
ImagePlot.setLocale(QLocale)
ImagePlot.setMask(QBitmap)

QWidget.setMask(QRegion)

ImagePlot.setMaximumHeight(int)
ImagePlot.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

ImagePlot.setMaximumWidth(int)
ImagePlot.setMidLineWidth(int)
ImagePlot.setMinimumHeight(int)
ImagePlot.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

ImagePlot.setMinimumWidth(int)
ImagePlot.setMouseTracking(bool)
ImagePlot.setObjectName(QString)
ImagePlot.setPalette(QPalette)
ImagePlot.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

ImagePlot.setProperty(str, QVariant) → bool
ImagePlot.setShortcutAutoRepeat(int, bool enabled=True)
ImagePlot.setShortcutEnabled(int, bool enabled=True)
ImagePlot.setShown(bool)
ImagePlot.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

ImagePlot.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

ImagePlot.setStatusTip(QString)
ImagePlot.setStyle(QStyle)
ImagePlot.setStyleSheet(QString)
ImagePlot.setTabOrder(QWidget, QWidget)
ImagePlot.setToolTip(QString)
ImagePlot.setUpdatesEnabled(bool)
ImagePlot.setVisible(bool)
ImagePlot.setWhatsThis(QString)
ImagePlot.setWindowFilePath(QString)
ImagePlot.setWindowFlags(Qt.WindowFlags)
ImagePlot.setWindowIcon(QIcon)
ImagePlot.setWindowIconText(QString)
ImagePlot.setWindowModality(Qt.WindowModality)
ImagePlot.setWindowModified(bool)
ImagePlot.setWindowOpacity(float)
ImagePlot.setWindowRole(QString)
ImagePlot.setWindowState(Qt.WindowStates)
ImagePlot.setWindowTitle(QString)
ImagePlot.set_active_item(item)

Override base set_active_item to change the grid’s axes according to the selected item

ImagePlot.set_antialiasing(checked)

Toggle curve antialiasing

ImagePlot.set_aspect_ratio(ratio=None, lock=None)[source]

Set aspect ratio

ImagePlot.set_axis_color(axis_id, color)

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

ImagePlot.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
ImagePlot.set_axis_font(axis_id, font)

Set axis font

ImagePlot.set_axis_limits(axis_id, vmin, vmax, stepsize=0)

Set axis limits (minimum and maximum values)

ImagePlot.set_axis_scale(axis_id, scale, autoscale=True)

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

ImagePlot.set_axis_ticks(axis_id, nmajor=None, nminor=None)

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

ImagePlot.set_axis_title(axis_id, text)

Set axis title

ImagePlot.set_axis_unit(axis_id, text)

Set axis unit

ImagePlot.set_item_visible(item, state, notify=True, replot=True)

Show/hide item and emit a SIG_ITEMS_CHANGED signal

ImagePlot.set_items(*args)

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

ImagePlot.set_items_readonly(state)

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

ImagePlot.set_manager(manager, plot_id)

Set the associated guiqwt.plot.PlotManager instance

ImagePlot.set_plot_limits(x0, x1, y0, y1, xaxis='bottom', yaxis='left')

Set plot scale limits

ImagePlot.set_pointer(pointer_type)

Set pointer. Valid values of pointer_type:

  • None: disable pointer
  • “canvas”: enable canvas pointer
  • “curve”: enable on-curve pointer
ImagePlot.set_scales(xscale, yscale)

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

ImagePlot.set_title(title)

Set plot title

ImagePlot.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
ImagePlot.show()
ImagePlot.showEvent(event)[source]

Override BasePlot method

ImagePlot.showFullScreen()
ImagePlot.showMaximized()
ImagePlot.showMinimized()
ImagePlot.showNormal()
ImagePlot.show_items(items=None, item_type=None)

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

ImagePlot.signalsBlocked() → bool
ImagePlot.size() → QSize
ImagePlot.sizeHint()

Preferred size

ImagePlot.sizeIncrement() → QSize
ImagePlot.sizePolicy() → QSizePolicy
ImagePlot.stackUnder(QWidget)
ImagePlot.startTimer(int) → int
ImagePlot.statusTip() → QString
ImagePlot.style() → QStyle
ImagePlot.styleSheet() → QString
ImagePlot.testAttribute(Qt.WidgetAttribute) → bool
ImagePlot.thread() → QThread
ImagePlot.toolTip() → QString
ImagePlot.topLevelWidget() → QWidget
ImagePlot.tr(str, str disambiguation=None, int n=-1) → QString
ImagePlot.trUtf8(str, str disambiguation=None, int n=-1) → QString
ImagePlot.underMouse() → bool
ImagePlot.ungrabGesture(Qt.GestureType)
ImagePlot.unselect_all()

Unselect all selected items

ImagePlot.unselect_item(item)

Unselect item

ImagePlot.unsetCursor()
ImagePlot.unsetLayoutDirection()
ImagePlot.unsetLocale()
ImagePlot.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

ImagePlot.updateGeometry()
ImagePlot.update_all_axes_styles()

Update all axes styles

ImagePlot.update_axis_style(axis_id)

Update axis style

ImagePlot.update_lut_range(_min, _max)[source]

update the LUT scale

ImagePlot.updatesEnabled() → bool
ImagePlot.visibleRegion() → QRegion
ImagePlot.whatsThis() → QString
ImagePlot.width() → int
ImagePlot.widthMM() → int
ImagePlot.winId() → int
ImagePlot.window() → QWidget
ImagePlot.windowFilePath() → QString
ImagePlot.windowFlags() → Qt.WindowFlags
ImagePlot.windowIcon() → QIcon
ImagePlot.windowIconText() → QString
ImagePlot.windowModality() → Qt.WindowModality
ImagePlot.windowOpacity() → float
ImagePlot.windowRole() → QString
ImagePlot.windowState() → Qt.WindowStates
ImagePlot.windowTitle() → QString
ImagePlot.windowType() → Qt.WindowType
ImagePlot.x() → int
ImagePlot.x11Info() → QX11Info
ImagePlot.x11PictureHandle() → int
ImagePlot.y() → int
class guiqwt.image.BaseImageItem(data=None, param=None)[source]
align_rectangular_shape(shape)[source]

Align rectangular shape to image pixels

draw_border(painter, xMap, yMap, canvasRect)[source]

Draw image border rectangle

draw_image(painter, canvasRect, src_rect, dst_rect, xMap, yMap)[source]

Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)[source]

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)[source]

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)[source]

Return average cross section along y-axis

get_closest_coordinates(x, y)[source]

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)[source]

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)[source]

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)[source]

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)[source]

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)[source]

Provides a filter object over this image’s content

get_histogram(nbins)[source]

interface de IHistDataSource

get_interpolation()[source]

Get interpolation mode

get_lut_range()[source]

Return the LUT transform range tuple: (min, max)

get_lut_range_full()[source]

Return full dynamic range

get_lut_range_max()[source]

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)[source]

Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)

Rounding is necessary to obtain array indexes from these coordinates

get_plot_coordinates(xpixel, ypixel)[source]

Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)

get_stats(x0, y0, x1, y1)[source]

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)[source]

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)[source]

Return cross section along y-axis at x=x0

is_empty()[source]

Return True if item data is empty

is_private()[source]

Return True if object is private

is_readonly()[source]

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)[source]

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_local_shape(old_pos, new_pos)[source]

Translate the shape such that old_pos becomes new_pos in canvas coordinates

move_with_selection(delta_x, delta_y)[source]

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()[source]

Select item

set_interpolation(interp_mode, size=None)[source]

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)[source]

Set LUT transform range lut_range is a tuple: (min, max)

set_movable(state)[source]

Set item movable state

set_private(state)[source]

Set object as private

set_readonly(state)[source]

Set object readonly state

set_resizable(state)[source]

Set item resizable state (or any action triggered when moving an handle, e.g. rotation)

set_rotatable(state)[source]

Set item rotatable state

set_selectable(state)[source]

Set item selectable state

unselect()[source]

Unselect item

update_border()[source]

Update image border rectangle to fit image shape

class guiqwt.image.RawImageItem(data=None, param=None)[source]
Construct a simple image item
  • data: 2D NumPy array
  • param (optional): image parameters (guiqwt.styles.RawImageParam instance)
align_rectangular_shape(shape)

Align rectangular shape to image pixels

deserialize(reader)[source]

Deserialize object from HDF5 reader

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

draw_image(painter, canvasRect, src_rect, dst_rect, xMap, yMap)

Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)

Rounding is necessary to obtain array indexes from these coordinates

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data(lut_range=None)[source]

Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(data, lut_range=None)[source]

Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.ImageItem(data=None, param=None)[source]
Construct a simple image item
align_rectangular_shape(shape)

Align rectangular shape to image pixels

deserialize(reader)[source]

Deserialize object from HDF5 reader

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)[source]

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)[source]

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)[source]

Return (image) pixel coordinates (from plot coordinates)

get_plot_coordinates(xpixel, ypixel)[source]

Return plot coordinates (from image pixel coordinates)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xdata()[source]

Return (xmin, xmax)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ydata()[source]

Return (ymin, ymax)

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data(lut_range=None)

Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(data, lut_range=None)

Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.TrImageItem(data=None, param=None)[source]
Construct a transformable image item
align_rectangular_shape(shape)

Align rectangular shape to image pixels

deserialize(reader)

Deserialize object from HDF5 reader

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)[source]

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)[source]

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_crop_coordinates()[source]

Return crop rectangle coordinates

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)[source]

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)[source]

Return (image) pixel coordinates (from plot coordinates)

get_plot_coordinates(xpixel, ypixel)[source]

Return plot coordinates (from image pixel coordinates)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data(lut_range=None)

Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’

move_local_point_to(handle, pos, ctrl=None)[source]

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_local_shape(old_pos, new_pos)[source]

Translate the shape such that old_pos becomes new_pos in canvas coordinates

move_with_selection(delta_x, delta_y)[source]

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

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

unselect()

Unselect item

class guiqwt.image.XYImageItem(x=None, y=None, data=None, param=None)[source]
Construct an image item with non-linear X/Y axes
  • x: 1D NumPy array, must be increasing
  • y: 1D NumPy array, must be increasing
  • data: 2D NumPy array
  • param (optional): image parameters (guiqwt.styles.XYImageParam instance)
align_rectangular_shape(shape)

Align rectangular shape to image pixels

deserialize(reader)[source]

Deserialize object from HDF5 reader

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)[source]

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)[source]

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)[source]

Return (image) pixel coordinates (from plot coordinates)

get_plot_coordinates(xpixel, ypixel)[source]

Return plot coordinates (from image pixel coordinates)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data(lut_range=None)

Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(data, lut_range=None)

Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.RGBImageItem(data=None, param=None)[source]
Construct a RGB/RGBA image item
  • data: NumPy array of uint8 (shape: NxMx[34] – 3: RGB, 4: RGBA)

(last dimension: 0:Red, 1:Green, 2:Blue[, 3:Alpha]) * param (optional): image parameters

(guiqwt.styles.RGBImageParam instance)
align_rectangular_shape(shape)

Align rectangular shape to image pixels

deserialize(reader)

Deserialize object from HDF5 reader

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates (from plot coordinates)

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates (from image pixel coordinates)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xdata()

Return (xmin, xmax)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ydata()

Return (ymin, ymax)

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data()[source]

Load data from filename filename has been set using method ‘set_filename’

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.MaskedImageItem(data=None, mask=None, param=None)[source]
Construct a masked image item
  • data: 2D NumPy array
  • mask (optional): 2D NumPy array
  • param (optional): image parameters (guiqwt.styles.MaskedImageParam instance)
align_rectangular_shape(shape)

Align rectangular shape to image pixels

apply_masked_areas()[source]

Apply masked areas

deserialize(reader)[source]

Deserialize object from HDF5 reader

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()[source]

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_mask()[source]

Return image mask

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates (from plot coordinates)

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates (from image pixel coordinates)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xdata()

Return (xmin, xmax)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ydata()

Return (ymin, ymax)

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_mask_visible()[source]

Return mask visibility

is_private()

Return True if object is private

is_readonly()

Return object readonly state

load_data(lut_range=None)

Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’

mask_all()[source]

Mask all pixels

mask_circular_area(x0, y0, x1, y1, inside=True, trace=True, do_signal=True)[source]

Mask circular area, inside the rectangle (x0, y0, x1, y1), i.e. circle with a radius of .5*(x1-x0) If inside is True (default), mask the inside of the area Otherwise, mask the outside

mask_rectangular_area(x0, y0, x1, y1, inside=True, trace=True, do_signal=True)[source]

Mask rectangular area If inside is True (default), mask the inside of the area Otherwise, mask the outside

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

set_data(data, lut_range=None)[source]

Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

set_mask(mask)[source]

Set image mask

set_mask_filename(fname)[source]

Set mask filename There are two ways for pickling mask data of MaskedImageItem objects:

  1. using the mask filename (as for data itself)
  2. using the mask areas (MaskedAreas instance, see set_mask_areas)

When saving objects, the first method is tried and then, if no filename has been defined for mask data, the second method is used.

set_mask_visible(state)[source]

Set mask visibility

set_masked_areas(areas)[source]

Set masked areas (see set_mask_filename)

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

unmask_all()[source]

Unmask all pixels

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.ImageFilterItem(image, filter, param)[source]
Construct a rectangular area image filter item
align_rectangular_shape(shape)

Align rectangular shape to image pixels

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

draw_image(painter, canvasRect, src_rect, dst_rect, xMap, yMap)

Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)

Rounding is necessary to obtain array indexes from these coordinates

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)[source]

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_local_shape(old_pos, new_pos)[source]

Translate the shape such that old_pos becomes new_pos in canvas coordinates

move_with_selection(delta_x, delta_y)[source]

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

set_filter(filter)[source]

Set the filter function * filter: function (x, y, data) –> data

set_image(image)[source]

Set the image item on which the filter will be applied * image: guiqwt.image.RawImageItem instance

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.XYImageFilterItem(image, filter, param)[source]
Construct a rectangular area image filter item
align_rectangular_shape(shape)

Align rectangular shape to image pixels

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)

Rounding is necessary to obtain array indexes from these coordinates

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

set_filter(filter)

Set the filter function * filter: function (x, y, data) –> data

set_image(image)[source]

Set the image item on which the filter will be applied * image: guiqwt.image.XYImageItem instance

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

class guiqwt.image.Histogram2DItem(X, Y, param=None, Z=None)[source]
Construct a 2D histogram item
align_rectangular_shape(shape)

Align rectangular shape to image pixels

draw_border(painter, xMap, yMap, canvasRect)

Draw image border rectangle

export_roi(src_rect, dst_rect, dst_image, apply_lut=False, apply_interpolation=False, original_resolution=False)

Export Region Of Interest to array

get_average_xsection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along x-axis

get_average_ysection(x0, y0, x1, y1, apply_lut=False)

Return average cross section along y-axis

get_closest_coordinates(x, y)

Return closest image pixel coordinates

get_closest_index_rect(x0, y0, x1, y1)

Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation

get_closest_indexes(x, y, corner=None)

Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)

get_closest_pixel_indexes(x, y)

Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)

Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)

get_data(x0, y0, x1=None, y1=None)

Return image data Arguments:

x0, y0 [, x1, y1]

Return image level at coordinates (x0,y0) If x1,y1 are specified:

return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
get_default_param()

Return instance of the default imageparam DataSet

get_filter(filterobj, filterparam)

Provides a filter object over this image’s content

get_histogram(nbins)[source]

interface de IHistDataSource

get_interpolation()

Get interpolation mode

get_lut_range()

Return the LUT transform range tuple: (min, max)

get_lut_range_full()

Return full dynamic range

get_lut_range_max()

Get maximum range for this dataset

get_pixel_coordinates(xplot, yplot)

Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)

Rounding is necessary to obtain array indexes from these coordinates

get_plot_coordinates(xpixel, ypixel)

Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)

get_stats(x0, y0, x1, y1)

Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)

get_xsection(y0, apply_lut=False)

Return cross section along x-axis at y=y0

get_ysection(x0, apply_lut=False)

Return cross section along y-axis at x=x0

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

set_bins(NX, NY)[source]

Set histogram bins

set_data(X, Y, Z=None)[source]

Set histogram data

set_interpolation(interp_mode, size=None)

Set image interpolation mode

interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size

set_lut_range(lut_range)

Set LUT transform range lut_range is a tuple: (min, max)

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

unselect()

Unselect item

update_border()

Update image border rectangle to fit image shape

guiqwt.image.assemble_imageitems(items, src_qrect, destw, desth, align=None, add_images=False, apply_lut=False, apply_interpolation=False, original_resolution=False)[source]

Assemble together image items in qrect (QRectF object) and return resulting pixel data <!> Does not support XYImageItem objects

guiqwt.image.get_plot_qrect(plot, p0, p1)[source]

Return QRectF rectangle object in plot coordinates from top-left and bottom-right QPoint objects in canvas coordinates

guiqwt.image.get_image_from_plot(plot, p0, p1, destw=None, desth=None, add_images=False, apply_lut=False, apply_interpolation=False, original_resolution=False)[source]

Return pixel data of a rectangular plot area (image items only) p0, p1: resp. top-left and bottom-right points (QPoint objects) apply_lut: apply contrast settings add_images: add superimposed images (instead of replace by the foreground)

Support only the image items implementing the IExportROIImageItemType interface, i.e. this does not support XYImageItem objects

guiqwt.histogram

The histogram module provides histogram related objects:

HistogramItem objects are plot items (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.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 guiqwt/__init__.py for details)

"""Histogram test"""

SHOW = True # Show test in GUI-based test launcher

from guiqwt.plot import CurveDialog
from guiqwt.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 guiqwt.histogram.HistogramItem(curveparam=None, histparam=None)[source]

A Qwt item representing histogram data

boundingRect()

Return the bounding rectangle of the data

deserialize(reader)

Deserialize object from HDF5 reader

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)

get_hist_source()[source]

Return histogram source (source: object with method ‘get_histogram’, e.g. objects derived from guiqwt.image.ImageItem)

get_logscale()[source]

Returns the status of the scale

hit_test(pos)

Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)

is_empty()

Return True if item data is empty

is_private()

Return True if object is private

is_readonly()

Return object readonly state

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_data(x, y)

Set curve data: * x: NumPy array * y: NumPy array

set_hist_data(data)[source]

Set histogram data

set_hist_source(src)[source]

Set histogram source (source: object with method ‘get_histogram’, e.g. objects derived from guiqwt.image.ImageItem)

set_logscale(state)[source]

Sets whether we use a logarithm or linear scale for the histogram counts

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

unselect()

Unselect item

class guiqwt.histogram.ContrastAdjustment(parent=None)[source]

Contrast adjustment tool

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

ContrastAdjustment.acceptDrops() → bool
ContrastAdjustment.accessibleDescription() → QString
ContrastAdjustment.accessibleName() → QString
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.childEvent(QChildEvent)
ContrastAdjustment.children() → list-of-QObject
ContrastAdjustment.childrenRect() → QRect
ContrastAdjustment.childrenRegion() → QRegion
ContrastAdjustment.clearFocus()
ContrastAdjustment.clearMask()
ContrastAdjustment.close() → bool
ContrastAdjustment.colorCount() → int
ContrastAdjustment.configure_panel()[source]

Configure panel

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.connectNotify(SIGNAL())
ContrastAdjustment.contentsMargins() → QMargins
ContrastAdjustment.contentsRect() → QRect
ContrastAdjustment.contextMenuEvent(QContextMenuEvent)
ContrastAdjustment.contextMenuPolicy() → Qt.ContextMenuPolicy
ContrastAdjustment.create(int window=0, 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.customEvent(QEvent)
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.disconnectNotify(SIGNAL())
ContrastAdjustment.dragEnterEvent(QDragEnterEvent)
ContrastAdjustment.dragLeaveEvent(QDragLeaveEvent)
ContrastAdjustment.dragMoveEvent(QDragMoveEvent)
ContrastAdjustment.dropEvent(QDropEvent)
ContrastAdjustment.dumpObjectInfo()
ContrastAdjustment.dumpObjectTree()
ContrastAdjustment.dynamicPropertyNames() → list-of-QByteArray
ContrastAdjustment.effectiveWinId() → int
ContrastAdjustment.emit(SIGNAL(), ...)
ContrastAdjustment.enabledChange(bool)
ContrastAdjustment.ensurePolished()
ContrastAdjustment.enterEvent(QEvent)
ContrastAdjustment.event(QEvent) → bool
ContrastAdjustment.eventFilter(QObject, QEvent) → bool
ContrastAdjustment.find(int) → QWidget
ContrastAdjustment.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

ContrastAdjustment.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> 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.handle() → int
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) → QVariant
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() → QString
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) → QVariant
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.receivers(SIGNAL()) → int
ContrastAdjustment.rect() → QRect
ContrastAdjustment.register_panel(manager)[source]

Register panel to plot manager

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.sender() → QObject
ContrastAdjustment.senderSignalIndex() → int
ContrastAdjustment.setAcceptDrops(bool)
ContrastAdjustment.setAccessibleDescription(QString)
ContrastAdjustment.setAccessibleName(QString)
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(QString)
ContrastAdjustment.setPalette(QPalette)
ContrastAdjustment.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

ContrastAdjustment.setProperty(str, QVariant) → 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(QString)
ContrastAdjustment.setStyle(QStyle)
ContrastAdjustment.setStyleSheet(QString)
ContrastAdjustment.setTabOrder(QWidget, QWidget)
ContrastAdjustment.setToolTip(QString)
ContrastAdjustment.setUpdatesEnabled(bool)
ContrastAdjustment.setVisible(bool)
ContrastAdjustment.setWhatsThis(QString)
ContrastAdjustment.setWindowFilePath(QString)
ContrastAdjustment.setWindowFlags(Qt.WindowFlags)
ContrastAdjustment.setWindowIcon(QIcon)
ContrastAdjustment.setWindowIconText(QString)
ContrastAdjustment.setWindowModality(Qt.WindowModality)
ContrastAdjustment.setWindowModified(bool)
ContrastAdjustment.setWindowOpacity(float)
ContrastAdjustment.setWindowRole(QString)
ContrastAdjustment.setWindowState(Qt.WindowStates)
ContrastAdjustment.setWindowTitle(QString)
ContrastAdjustment.set_range(_min, _max)[source]

Set contrast panel’s histogram range

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() → QString
ContrastAdjustment.style() → QStyle
ContrastAdjustment.styleSheet() → QString
ContrastAdjustment.tabletEvent(QTabletEvent)
ContrastAdjustment.testAttribute(Qt.WidgetAttribute) → bool
ContrastAdjustment.thread() → QThread
ContrastAdjustment.timerEvent(QTimerEvent)
ContrastAdjustment.toolTip() → QString
ContrastAdjustment.topLevelWidget() → QWidget
ContrastAdjustment.tr(str, str disambiguation=None, int n=-1) → QString
ContrastAdjustment.trUtf8(str, str disambiguation=None, int n=-1) → QString
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() → QString
ContrastAdjustment.wheelEvent(QWheelEvent)
ContrastAdjustment.width() → int
ContrastAdjustment.widthMM() → int
ContrastAdjustment.winId() → int
ContrastAdjustment.window() → QWidget
ContrastAdjustment.windowActivationChange(bool)
ContrastAdjustment.windowFilePath() → QString
ContrastAdjustment.windowFlags() → Qt.WindowFlags
ContrastAdjustment.windowIcon() → QIcon
ContrastAdjustment.windowIconText() → QString
ContrastAdjustment.windowModality() → Qt.WindowModality
ContrastAdjustment.windowOpacity() → float
ContrastAdjustment.windowRole() → QString
ContrastAdjustment.windowState() → Qt.WindowStates
ContrastAdjustment.windowTitle() → QString
ContrastAdjustment.windowType() → Qt.WindowType
ContrastAdjustment.x() → int
ContrastAdjustment.x11Info() → QX11Info
ContrastAdjustment.x11PictureHandle() → int
ContrastAdjustment.y() → int
class guiqwt.histogram.LevelsHistogram(parent=None)[source]

Image levels histogram widget

DEFAULT_ITEM_TYPE

alias of ICurveItemType

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

LevelsHistogram.acceptDrops() → bool
LevelsHistogram.accessibleDescription() → QString
LevelsHistogram.accessibleName() → QString
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: QwtPlotItem (PyQt4.Qwt5) object implementing

the IBasePlotItem interface (guiqwt.interfaces)
  • z: item’s z order (None -> z = max(self.get_items())+1)
LevelsHistogram.add_item_with_z_offset(item, zoffset)

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

LevelsHistogram.adjustSize()
LevelsHistogram.autoFillBackground() → bool
LevelsHistogram.backgroundRole() → QPalette.ColorRole
LevelsHistogram.baseSize() → QSize
LevelsHistogram.blockSignals(bool) → bool
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

See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()

LevelsHistogram.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

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)

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.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() → int
LevelsHistogram.eliminate_outliers(percent)[source]

Eliminate outliers: eliminate percent/2*N counts on each side of the histogram (where N is the total count number)

LevelsHistogram.emit(SIGNAL(), ...)
LevelsHistogram.enable_used_axes()

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

LevelsHistogram.ensurePolished()
LevelsHistogram.eventFilter(QObject, QEvent) → bool
LevelsHistogram.find(int) → QWidget
LevelsHistogram.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

LevelsHistogram.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> 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
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.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

LevelsHistogram.get_context_menu()

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_dist

else: 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.handle() → int
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.inputContext() → QInputContext
LevelsHistogram.inputMethodHints() → Qt.InputMethodHints
LevelsHistogram.inputMethodQuery(Qt.InputMethodQuery) → QVariant
LevelsHistogram.insertAction(QAction, QAction)
LevelsHistogram.insertActions(QAction, list-of-QAction)
LevelsHistogram.installEventFilter(QObject)
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.keyboardGrabber() → QWidget
LevelsHistogram.killTimer(int)
LevelsHistogram.layout() → QLayout
LevelsHistogram.layoutDirection() → Qt.LayoutDirection
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.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() → QString
LevelsHistogram.overrideWindowFlags(Qt.WindowFlags)
LevelsHistogram.overrideWindowState(Qt.WindowStates)
LevelsHistogram.paintEngine() → QPaintEngine
LevelsHistogram.paintingActive() → bool
LevelsHistogram.palette() → QPalette
LevelsHistogram.parent() → QObject
LevelsHistogram.parentWidget() → QWidget
LevelsHistogram.physicalDpiX() → int
LevelsHistogram.physicalDpiY() → int
LevelsHistogram.pos() → QPoint
LevelsHistogram.previousInFocusChain() → QWidget
LevelsHistogram.property(str) → QVariant
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.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.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

See also guiqwt.baseplot.BasePlot.save_items()

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

See also guiqwt.baseplot.BasePlot.restore_items()

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

See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()

LevelsHistogram.setAcceptDrops(bool)
LevelsHistogram.setAccessibleDescription(QString)
LevelsHistogram.setAccessibleName(QString)
LevelsHistogram.setAttribute(Qt.WidgetAttribute, bool on=True)
LevelsHistogram.setAutoFillBackground(bool)
LevelsHistogram.setBackgroundRole(QPalette.ColorRole)
LevelsHistogram.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

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)
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(QString)
LevelsHistogram.setPalette(QPalette)
LevelsHistogram.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

LevelsHistogram.setProperty(str, QVariant) → 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(QString)
LevelsHistogram.setStyle(QStyle)
LevelsHistogram.setStyleSheet(QString)
LevelsHistogram.setTabOrder(QWidget, QWidget)
LevelsHistogram.setToolTip(QString)
LevelsHistogram.setUpdatesEnabled(bool)
LevelsHistogram.setVisible(bool)
LevelsHistogram.setWhatsThis(QString)
LevelsHistogram.setWindowFilePath(QString)
LevelsHistogram.setWindowFlags(Qt.WindowFlags)
LevelsHistogram.setWindowIcon(QIcon)
LevelsHistogram.setWindowIconText(QString)
LevelsHistogram.setWindowModality(Qt.WindowModality)
LevelsHistogram.setWindowModified(bool)
LevelsHistogram.setWindowOpacity(float)
LevelsHistogram.setWindowRole(QString)
LevelsHistogram.setWindowState(Qt.WindowStates)
LevelsHistogram.setWindowTitle(QString)
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_full_range()[source]

Set range bounds to image min/max levels

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 guiqwt.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() → QString
LevelsHistogram.style() → QStyle
LevelsHistogram.styleSheet() → QString
LevelsHistogram.testAttribute(Qt.WidgetAttribute) → bool
LevelsHistogram.thread() → QThread
LevelsHistogram.toolTip() → QString
LevelsHistogram.topLevelWidget() → QWidget
LevelsHistogram.tr(str, str disambiguation=None, int n=-1) → QString
LevelsHistogram.trUtf8(str, str disambiguation=None, int n=-1) → QString
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.updateGeometry()
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() → QString
LevelsHistogram.width() → int
LevelsHistogram.widthMM() → int
LevelsHistogram.winId() → int
LevelsHistogram.window() → QWidget
LevelsHistogram.windowFilePath() → QString
LevelsHistogram.windowFlags() → Qt.WindowFlags
LevelsHistogram.windowIcon() → QIcon
LevelsHistogram.windowIconText() → QString
LevelsHistogram.windowModality() → Qt.WindowModality
LevelsHistogram.windowOpacity() → float
LevelsHistogram.windowRole() → QString
LevelsHistogram.windowState() → Qt.WindowStates
LevelsHistogram.windowTitle() → QString
LevelsHistogram.windowType() → Qt.WindowType
LevelsHistogram.x() → int
LevelsHistogram.x11Info() → QX11Info
LevelsHistogram.x11PictureHandle() → int
LevelsHistogram.y() → int

guiqwt.cross_section

The cross_section module provides cross section related objects:

Example

Simple cross-section demo:

# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)

"""Renders a cross section chosen by a cross marker"""

SHOW = True # Show test in GUI-based test launcher

import os.path as osp, numpy as np

from guiqwt.plot import ImageDialog
from guiqwt.builder import make

def create_window():
    win = ImageDialog(edit=False, toolbar=True, wintitle="Cross sections test",
                      options=dict(show_xsection=True, show_ysection=True))
    win.resize(600, 600)
    return win

def test():
    """Test"""
    # -- Create QApplication
    import guidata
    _app = guidata.qapplication()
    # --
    filename = osp.join(osp.dirname(__file__), "brain.png")
    win = create_window()
    image = make.image(filename=filename, colormap="bone")
    data2 = np.array(image.data.T[200:], copy=True)
    image2 = make.image(data2, title="Modified", alpha_mask=True)
    plot = win.get_plot()
    plot.add_item(image)
    plot.add_item(image2, z=1)
    win.exec_()

if __name__ == "__main__":
    test()

Reference

class guiqwt.cross_section.XCrossSection(parent=None)[source]

X-axis cross section widget

CrossSectionPlotKlass

alias of XCrossSectionPlot

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

XCrossSection.acceptDrops() → bool
XCrossSection.accessibleDescription() → QString
XCrossSection.accessibleName() → QString
XCrossSection.actionEvent(QActionEvent)
XCrossSection.actions() → list-of-QAction
XCrossSection.activateWindow()
XCrossSection.addAction(QAction)
XCrossSection.addActions(list-of-QAction)
XCrossSection.adjustSize()
XCrossSection.autoFillBackground() → bool
XCrossSection.backgroundRole() → QPalette.ColorRole
XCrossSection.baseSize() → QSize
XCrossSection.blockSignals(bool) → bool
XCrossSection.changeEvent(QEvent)
XCrossSection.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

XCrossSection.childEvent(QChildEvent)
XCrossSection.children() → list-of-QObject
XCrossSection.childrenRect() → QRect
XCrossSection.childrenRegion() → QRegion
XCrossSection.clearFocus()
XCrossSection.clearMask()
XCrossSection.close() → bool
XCrossSection.colorCount() → int
XCrossSection.configure_panel()

Configure panel

XCrossSection.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

XCrossSection.connectNotify(SIGNAL())
XCrossSection.contentsMargins() → QMargins
XCrossSection.contentsRect() → QRect
XCrossSection.contextMenuEvent(QContextMenuEvent)
XCrossSection.contextMenuPolicy() → Qt.ContextMenuPolicy
XCrossSection.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
XCrossSection.create_dockwidget(title)

Add to parent QMainWindow as a dock widget

XCrossSection.cs_curve_has_changed(curve)

Cross section curve has just changed

XCrossSection.cursor() → QCursor
XCrossSection.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

XCrossSection.customEvent(QEvent)
XCrossSection.deleteLater()
XCrossSection.depth() → int
XCrossSection.destroy(bool destroyWindow=True, bool destroySubWindows=True)
XCrossSection.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

XCrossSection.devType() → int
XCrossSection.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

XCrossSection.disconnectNotify(SIGNAL())
XCrossSection.dragEnterEvent(QDragEnterEvent)
XCrossSection.dragLeaveEvent(QDragLeaveEvent)
XCrossSection.dragMoveEvent(QDragMoveEvent)
XCrossSection.dropEvent(QDropEvent)
XCrossSection.dumpObjectInfo()
XCrossSection.dumpObjectTree()
XCrossSection.dynamicPropertyNames() → list-of-QByteArray
XCrossSection.effectiveWinId() → int
XCrossSection.emit(SIGNAL(), ...)
XCrossSection.enabledChange(bool)
XCrossSection.ensurePolished()
XCrossSection.enterEvent(QEvent)
XCrossSection.event(QEvent) → bool
XCrossSection.eventFilter(QObject, QEvent) → bool
XCrossSection.find(int) → QWidget
XCrossSection.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

XCrossSection.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

XCrossSection.focusInEvent(QFocusEvent)
XCrossSection.focusNextChild() → bool
XCrossSection.focusNextPrevChild(bool) → bool
XCrossSection.focusOutEvent(QFocusEvent)
XCrossSection.focusPolicy() → Qt.FocusPolicy
XCrossSection.focusPreviousChild() → bool
XCrossSection.focusProxy() → QWidget
XCrossSection.focusWidget() → QWidget
XCrossSection.font() → QFont
XCrossSection.fontChange(QFont)
XCrossSection.fontInfo() → QFontInfo
XCrossSection.fontMetrics() → QFontMetrics
XCrossSection.foregroundRole() → QPalette.ColorRole
XCrossSection.frameGeometry() → QRect
XCrossSection.frameSize() → QSize
XCrossSection.geometry() → QRect
XCrossSection.getContentsMargins() -> (int, int, int, int)
XCrossSection.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
XCrossSection.grabKeyboard()
XCrossSection.grabMouse()

QWidget.grabMouse(QCursor)

XCrossSection.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
XCrossSection.graphicsEffect() → QGraphicsEffect
XCrossSection.graphicsProxyWidget() → QGraphicsProxyWidget
XCrossSection.handle() → int
XCrossSection.hasFocus() → bool
XCrossSection.hasMouseTracking() → bool
XCrossSection.height() → int
XCrossSection.heightForWidth(int) → int
XCrossSection.heightMM() → int
XCrossSection.hide()
XCrossSection.inherits(str) → bool
XCrossSection.inputContext() → QInputContext
XCrossSection.inputMethodEvent(QInputMethodEvent)
XCrossSection.inputMethodHints() → Qt.InputMethodHints
XCrossSection.inputMethodQuery(Qt.InputMethodQuery) → QVariant
XCrossSection.insertAction(QAction, QAction)
XCrossSection.insertActions(QAction, list-of-QAction)
XCrossSection.installEventFilter(QObject)
XCrossSection.isActiveWindow() → bool
XCrossSection.isAncestorOf(QWidget) → bool
XCrossSection.isEnabled() → bool
XCrossSection.isEnabledTo(QWidget) → bool
XCrossSection.isEnabledToTLW() → bool
XCrossSection.isFullScreen() → bool
XCrossSection.isHidden() → bool
XCrossSection.isLeftToRight() → bool
XCrossSection.isMaximized() → bool
XCrossSection.isMinimized() → bool
XCrossSection.isModal() → bool
XCrossSection.isRightToLeft() → bool
XCrossSection.isTopLevel() → bool
XCrossSection.isVisible() → bool
XCrossSection.isVisibleTo(QWidget) → bool
XCrossSection.isWidgetType() → bool
XCrossSection.isWindow() → bool
XCrossSection.isWindowModified() → bool
XCrossSection.keyPressEvent(QKeyEvent)
XCrossSection.keyReleaseEvent(QKeyEvent)
XCrossSection.keyboardGrabber() → QWidget
XCrossSection.killTimer(int)
XCrossSection.languageChange()
XCrossSection.layout() → QLayout
XCrossSection.layoutDirection() → Qt.LayoutDirection
XCrossSection.leaveEvent(QEvent)
XCrossSection.locale() → QLocale
XCrossSection.logicalDpiX() → int
XCrossSection.logicalDpiY() → int
XCrossSection.lower()
XCrossSection.mapFrom(QWidget, QPoint) → QPoint
XCrossSection.mapFromGlobal(QPoint) → QPoint
XCrossSection.mapFromParent(QPoint) → QPoint
XCrossSection.mapTo(QWidget, QPoint) → QPoint
XCrossSection.mapToGlobal(QPoint) → QPoint
XCrossSection.mapToParent(QPoint) → QPoint
XCrossSection.mask() → QRegion
XCrossSection.maximumHeight() → int
XCrossSection.maximumSize() → QSize
XCrossSection.maximumWidth() → int
XCrossSection.metaObject() → QMetaObject
XCrossSection.metric(QPaintDevice.PaintDeviceMetric) → int
XCrossSection.minimumHeight() → int
XCrossSection.minimumSize() → QSize
XCrossSection.minimumSizeHint() → QSize
XCrossSection.minimumWidth() → int
XCrossSection.mouseDoubleClickEvent(QMouseEvent)
XCrossSection.mouseGrabber() → QWidget
XCrossSection.mouseMoveEvent(QMouseEvent)
XCrossSection.mousePressEvent(QMouseEvent)
XCrossSection.mouseReleaseEvent(QMouseEvent)
XCrossSection.move(QPoint)

QWidget.move(int, int)

XCrossSection.moveEvent(QMoveEvent)
XCrossSection.moveToThread(QThread)
XCrossSection.nativeParentWidget() → QWidget
XCrossSection.nextInFocusChain() → QWidget
XCrossSection.normalGeometry() → QRect
XCrossSection.numColors() → int
XCrossSection.objectName() → QString
XCrossSection.overrideWindowFlags(Qt.WindowFlags)
XCrossSection.overrideWindowState(Qt.WindowStates)
XCrossSection.paintEngine() → QPaintEngine
XCrossSection.paintEvent(QPaintEvent)
XCrossSection.paintingActive() → bool
XCrossSection.palette() → QPalette
XCrossSection.paletteChange(QPalette)
XCrossSection.parent() → QObject
XCrossSection.parentWidget() → QWidget
XCrossSection.physicalDpiX() → int
XCrossSection.physicalDpiY() → int
XCrossSection.pos() → QPoint
XCrossSection.previousInFocusChain() → QWidget
XCrossSection.property(str) → QVariant
XCrossSection.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.

XCrossSection.raise_()
XCrossSection.receivers(SIGNAL()) → int
XCrossSection.rect() → QRect
XCrossSection.register_panel(manager)

Register panel to plot manager

XCrossSection.releaseKeyboard()
XCrossSection.releaseMouse()
XCrossSection.releaseShortcut(int)
XCrossSection.removeAction(QAction)
XCrossSection.removeEventFilter(QObject)
XCrossSection.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)

XCrossSection.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

XCrossSection.resetInputContext()
XCrossSection.resize(QSize)

QWidget.resize(int, int)

XCrossSection.resizeEvent(QResizeEvent)
XCrossSection.restoreGeometry(QByteArray) → bool
XCrossSection.saveGeometry() → QByteArray
XCrossSection.scroll(int, int)

QWidget.scroll(int, int, QRect)

XCrossSection.sender() → QObject
XCrossSection.senderSignalIndex() → int
XCrossSection.setAcceptDrops(bool)
XCrossSection.setAccessibleDescription(QString)
XCrossSection.setAccessibleName(QString)
XCrossSection.setAttribute(Qt.WidgetAttribute, bool on=True)
XCrossSection.setAutoFillBackground(bool)
XCrossSection.setBackgroundRole(QPalette.ColorRole)
XCrossSection.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

XCrossSection.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

XCrossSection.setContextMenuPolicy(Qt.ContextMenuPolicy)
XCrossSection.setCursor(QCursor)
XCrossSection.setDisabled(bool)
XCrossSection.setEnabled(bool)
XCrossSection.setFixedHeight(int)
XCrossSection.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

XCrossSection.setFixedWidth(int)
XCrossSection.setFocus()

QWidget.setFocus(Qt.FocusReason)

XCrossSection.setFocusPolicy(Qt.FocusPolicy)
XCrossSection.setFocusProxy(QWidget)
XCrossSection.setFont(QFont)
XCrossSection.setForegroundRole(QPalette.ColorRole)
XCrossSection.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

XCrossSection.setGraphicsEffect(QGraphicsEffect)
XCrossSection.setHidden(bool)
XCrossSection.setInputContext(QInputContext)
XCrossSection.setInputMethodHints(Qt.InputMethodHints)
XCrossSection.setLayout(QLayout)
XCrossSection.setLayoutDirection(Qt.LayoutDirection)
XCrossSection.setLocale(QLocale)
XCrossSection.setMask(QBitmap)

QWidget.setMask(QRegion)

XCrossSection.setMaximumHeight(int)
XCrossSection.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

XCrossSection.setMaximumWidth(int)
XCrossSection.setMinimumHeight(int)
XCrossSection.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

XCrossSection.setMinimumWidth(int)
XCrossSection.setMouseTracking(bool)
XCrossSection.setObjectName(QString)
XCrossSection.setPalette(QPalette)
XCrossSection.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

XCrossSection.setProperty(str, QVariant) → bool
XCrossSection.setShortcutAutoRepeat(int, bool enabled=True)
XCrossSection.setShortcutEnabled(int, bool enabled=True)
XCrossSection.setShown(bool)
XCrossSection.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

XCrossSection.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

XCrossSection.setStatusTip(QString)
XCrossSection.setStyle(QStyle)
XCrossSection.setStyleSheet(QString)
XCrossSection.setTabOrder(QWidget, QWidget)
XCrossSection.setToolTip(QString)
XCrossSection.setUpdatesEnabled(bool)
XCrossSection.setVisible(bool)
XCrossSection.setWhatsThis(QString)
XCrossSection.setWindowFilePath(QString)
XCrossSection.setWindowFlags(Qt.WindowFlags)
XCrossSection.setWindowIcon(QIcon)
XCrossSection.setWindowIconText(QString)
XCrossSection.setWindowModality(Qt.WindowModality)
XCrossSection.setWindowModified(bool)
XCrossSection.setWindowOpacity(float)
XCrossSection.setWindowRole(QString)
XCrossSection.setWindowState(Qt.WindowStates)
XCrossSection.setWindowTitle(QString)
XCrossSection.show()
XCrossSection.showFullScreen()
XCrossSection.showMaximized()
XCrossSection.showMinimized()
XCrossSection.showNormal()
XCrossSection.signalsBlocked() → bool
XCrossSection.size() → QSize
XCrossSection.sizeHint() → QSize
XCrossSection.sizeIncrement() → QSize
XCrossSection.sizePolicy() → QSizePolicy
XCrossSection.stackUnder(QWidget)
XCrossSection.startTimer(int) → int
XCrossSection.statusTip() → QString
XCrossSection.style() → QStyle
XCrossSection.styleSheet() → QString
XCrossSection.tabletEvent(QTabletEvent)
XCrossSection.testAttribute(Qt.WidgetAttribute) → bool
XCrossSection.thread() → QThread
XCrossSection.timerEvent(QTimerEvent)
XCrossSection.toolTip() → QString
XCrossSection.topLevelWidget() → QWidget
XCrossSection.tr(str, str disambiguation=None, int n=-1) → QString
XCrossSection.trUtf8(str, str disambiguation=None, int n=-1) → QString
XCrossSection.underMouse() → bool
XCrossSection.ungrabGesture(Qt.GestureType)
XCrossSection.unsetCursor()
XCrossSection.unsetLayoutDirection()
XCrossSection.unsetLocale()
XCrossSection.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

XCrossSection.updateGeometry()
XCrossSection.updateMicroFocus()
XCrossSection.update_plot(obj=None)

Update cross section curve(s) associated to object obj

obj may be a marker or a rectangular shape (see guiqwt.tools.CrossSectionTool and guiqwt.tools.AverageCrossSectionTool)

If obj is None, update the cross sections of the last active object

XCrossSection.updatesEnabled() → bool
XCrossSection.visibility_changed(enable)

DockWidget visibility has changed

XCrossSection.visibleRegion() → QRegion
XCrossSection.whatsThis() → QString
XCrossSection.wheelEvent(QWheelEvent)
XCrossSection.width() → int
XCrossSection.widthMM() → int
XCrossSection.winId() → int
XCrossSection.window() → QWidget
XCrossSection.windowActivationChange(bool)
XCrossSection.windowFilePath() → QString
XCrossSection.windowFlags() → Qt.WindowFlags
XCrossSection.windowIcon() → QIcon
XCrossSection.windowIconText() → QString
XCrossSection.windowModality() → Qt.WindowModality
XCrossSection.windowOpacity() → float
XCrossSection.windowRole() → QString
XCrossSection.windowState() → Qt.WindowStates
XCrossSection.windowTitle() → QString
XCrossSection.windowType() → Qt.WindowType
XCrossSection.x() → int
XCrossSection.x11Info() → QX11Info
XCrossSection.x11PictureHandle() → int
XCrossSection.y() → int
class guiqwt.cross_section.YCrossSection(parent=None, position='right', xsection_pos='top')[source]

Y-axis cross section widget parent (QWidget): parent widget position (string): “left” or “right”

CrossSectionPlotKlass

alias of YCrossSectionPlot

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

YCrossSection.acceptDrops() → bool
YCrossSection.accessibleDescription() → QString
YCrossSection.accessibleName() → QString
YCrossSection.actionEvent(QActionEvent)
YCrossSection.actions() → list-of-QAction
YCrossSection.activateWindow()
YCrossSection.addAction(QAction)
YCrossSection.addActions(list-of-QAction)
YCrossSection.adjustSize()
YCrossSection.autoFillBackground() → bool
YCrossSection.backgroundRole() → QPalette.ColorRole
YCrossSection.baseSize() → QSize
YCrossSection.blockSignals(bool) → bool
YCrossSection.changeEvent(QEvent)
YCrossSection.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

YCrossSection.childEvent(QChildEvent)
YCrossSection.children() → list-of-QObject
YCrossSection.childrenRect() → QRect
YCrossSection.childrenRegion() → QRegion
YCrossSection.clearFocus()
YCrossSection.clearMask()
YCrossSection.close() → bool
YCrossSection.colorCount() → int
YCrossSection.configure_panel()

Configure panel

YCrossSection.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

YCrossSection.connectNotify(SIGNAL())
YCrossSection.contentsMargins() → QMargins
YCrossSection.contentsRect() → QRect
YCrossSection.contextMenuEvent(QContextMenuEvent)
YCrossSection.contextMenuPolicy() → Qt.ContextMenuPolicy
YCrossSection.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
YCrossSection.create_dockwidget(title)

Add to parent QMainWindow as a dock widget

YCrossSection.cs_curve_has_changed(curve)

Cross section curve has just changed

YCrossSection.cursor() → QCursor
YCrossSection.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

YCrossSection.customEvent(QEvent)
YCrossSection.deleteLater()
YCrossSection.depth() → int
YCrossSection.destroy(bool destroyWindow=True, bool destroySubWindows=True)
YCrossSection.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

YCrossSection.devType() → int
YCrossSection.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

YCrossSection.disconnectNotify(SIGNAL())
YCrossSection.dragEnterEvent(QDragEnterEvent)
YCrossSection.dragLeaveEvent(QDragLeaveEvent)
YCrossSection.dragMoveEvent(QDragMoveEvent)
YCrossSection.dropEvent(QDropEvent)
YCrossSection.dumpObjectInfo()
YCrossSection.dumpObjectTree()
YCrossSection.dynamicPropertyNames() → list-of-QByteArray
YCrossSection.effectiveWinId() → int
YCrossSection.emit(SIGNAL(), ...)
YCrossSection.enabledChange(bool)
YCrossSection.ensurePolished()
YCrossSection.enterEvent(QEvent)
YCrossSection.event(QEvent) → bool
YCrossSection.eventFilter(QObject, QEvent) → bool
YCrossSection.find(int) → QWidget
YCrossSection.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

YCrossSection.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

YCrossSection.focusInEvent(QFocusEvent)
YCrossSection.focusNextChild() → bool
YCrossSection.focusNextPrevChild(bool) → bool
YCrossSection.focusOutEvent(QFocusEvent)
YCrossSection.focusPolicy() → Qt.FocusPolicy
YCrossSection.focusPreviousChild() → bool
YCrossSection.focusProxy() → QWidget
YCrossSection.focusWidget() → QWidget
YCrossSection.font() → QFont
YCrossSection.fontChange(QFont)
YCrossSection.fontInfo() → QFontInfo
YCrossSection.fontMetrics() → QFontMetrics
YCrossSection.foregroundRole() → QPalette.ColorRole
YCrossSection.frameGeometry() → QRect
YCrossSection.frameSize() → QSize
YCrossSection.geometry() → QRect
YCrossSection.getContentsMargins() -> (int, int, int, int)
YCrossSection.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
YCrossSection.grabKeyboard()
YCrossSection.grabMouse()

QWidget.grabMouse(QCursor)

YCrossSection.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
YCrossSection.graphicsEffect() → QGraphicsEffect
YCrossSection.graphicsProxyWidget() → QGraphicsProxyWidget
YCrossSection.handle() → int
YCrossSection.hasFocus() → bool
YCrossSection.hasMouseTracking() → bool
YCrossSection.height() → int
YCrossSection.heightForWidth(int) → int
YCrossSection.heightMM() → int
YCrossSection.hide()
YCrossSection.inherits(str) → bool
YCrossSection.inputContext() → QInputContext
YCrossSection.inputMethodEvent(QInputMethodEvent)
YCrossSection.inputMethodHints() → Qt.InputMethodHints
YCrossSection.inputMethodQuery(Qt.InputMethodQuery) → QVariant
YCrossSection.insertAction(QAction, QAction)
YCrossSection.insertActions(QAction, list-of-QAction)
YCrossSection.installEventFilter(QObject)
YCrossSection.isActiveWindow() → bool
YCrossSection.isAncestorOf(QWidget) → bool
YCrossSection.isEnabled() → bool
YCrossSection.isEnabledTo(QWidget) → bool
YCrossSection.isEnabledToTLW() → bool
YCrossSection.isFullScreen() → bool
YCrossSection.isHidden() → bool
YCrossSection.isLeftToRight() → bool
YCrossSection.isMaximized() → bool
YCrossSection.isMinimized() → bool
YCrossSection.isModal() → bool
YCrossSection.isRightToLeft() → bool
YCrossSection.isTopLevel() → bool
YCrossSection.isVisible() → bool
YCrossSection.isVisibleTo(QWidget) → bool
YCrossSection.isWidgetType() → bool
YCrossSection.isWindow() → bool
YCrossSection.isWindowModified() → bool
YCrossSection.keyPressEvent(QKeyEvent)
YCrossSection.keyReleaseEvent(QKeyEvent)
YCrossSection.keyboardGrabber() → QWidget
YCrossSection.killTimer(int)
YCrossSection.languageChange()
YCrossSection.layout() → QLayout
YCrossSection.layoutDirection() → Qt.LayoutDirection
YCrossSection.leaveEvent(QEvent)
YCrossSection.locale() → QLocale
YCrossSection.logicalDpiX() → int
YCrossSection.logicalDpiY() → int
YCrossSection.lower()
YCrossSection.mapFrom(QWidget, QPoint) → QPoint
YCrossSection.mapFromGlobal(QPoint) → QPoint
YCrossSection.mapFromParent(QPoint) → QPoint
YCrossSection.mapTo(QWidget, QPoint) → QPoint
YCrossSection.mapToGlobal(QPoint) → QPoint
YCrossSection.mapToParent(QPoint) → QPoint
YCrossSection.mask() → QRegion
YCrossSection.maximumHeight() → int
YCrossSection.maximumSize() → QSize
YCrossSection.maximumWidth() → int
YCrossSection.metaObject() → QMetaObject
YCrossSection.metric(QPaintDevice.PaintDeviceMetric) → int
YCrossSection.minimumHeight() → int
YCrossSection.minimumSize() → QSize
YCrossSection.minimumSizeHint() → QSize
YCrossSection.minimumWidth() → int
YCrossSection.mouseDoubleClickEvent(QMouseEvent)
YCrossSection.mouseGrabber() → QWidget
YCrossSection.mouseMoveEvent(QMouseEvent)
YCrossSection.mousePressEvent(QMouseEvent)
YCrossSection.mouseReleaseEvent(QMouseEvent)
YCrossSection.move(QPoint)

QWidget.move(int, int)

YCrossSection.moveEvent(QMoveEvent)
YCrossSection.moveToThread(QThread)
YCrossSection.nativeParentWidget() → QWidget
YCrossSection.nextInFocusChain() → QWidget
YCrossSection.normalGeometry() → QRect
YCrossSection.numColors() → int
YCrossSection.objectName() → QString
YCrossSection.overrideWindowFlags(Qt.WindowFlags)
YCrossSection.overrideWindowState(Qt.WindowStates)
YCrossSection.paintEngine() → QPaintEngine
YCrossSection.paintEvent(QPaintEvent)
YCrossSection.paintingActive() → bool
YCrossSection.palette() → QPalette
YCrossSection.paletteChange(QPalette)
YCrossSection.parent() → QObject
YCrossSection.parentWidget() → QWidget
YCrossSection.physicalDpiX() → int
YCrossSection.physicalDpiY() → int
YCrossSection.pos() → QPoint
YCrossSection.previousInFocusChain() → QWidget
YCrossSection.property(str) → QVariant
YCrossSection.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.

YCrossSection.raise_()
YCrossSection.receivers(SIGNAL()) → int
YCrossSection.rect() → QRect
YCrossSection.register_panel(manager)

Register panel to plot manager

YCrossSection.releaseKeyboard()
YCrossSection.releaseMouse()
YCrossSection.releaseShortcut(int)
YCrossSection.removeAction(QAction)
YCrossSection.removeEventFilter(QObject)
YCrossSection.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)

YCrossSection.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

YCrossSection.resetInputContext()
YCrossSection.resize(QSize)

QWidget.resize(int, int)

YCrossSection.resizeEvent(QResizeEvent)
YCrossSection.restoreGeometry(QByteArray) → bool
YCrossSection.saveGeometry() → QByteArray
YCrossSection.scroll(int, int)

QWidget.scroll(int, int, QRect)

YCrossSection.sender() → QObject
YCrossSection.senderSignalIndex() → int
YCrossSection.setAcceptDrops(bool)
YCrossSection.setAccessibleDescription(QString)
YCrossSection.setAccessibleName(QString)
YCrossSection.setAttribute(Qt.WidgetAttribute, bool on=True)
YCrossSection.setAutoFillBackground(bool)
YCrossSection.setBackgroundRole(QPalette.ColorRole)
YCrossSection.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

YCrossSection.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

YCrossSection.setContextMenuPolicy(Qt.ContextMenuPolicy)
YCrossSection.setCursor(QCursor)
YCrossSection.setDisabled(bool)
YCrossSection.setEnabled(bool)
YCrossSection.setFixedHeight(int)
YCrossSection.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

YCrossSection.setFixedWidth(int)
YCrossSection.setFocus()

QWidget.setFocus(Qt.FocusReason)

YCrossSection.setFocusPolicy(Qt.FocusPolicy)
YCrossSection.setFocusProxy(QWidget)
YCrossSection.setFont(QFont)
YCrossSection.setForegroundRole(QPalette.ColorRole)
YCrossSection.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

YCrossSection.setGraphicsEffect(QGraphicsEffect)
YCrossSection.setHidden(bool)
YCrossSection.setInputContext(QInputContext)
YCrossSection.setInputMethodHints(Qt.InputMethodHints)
YCrossSection.setLayout(QLayout)
YCrossSection.setLayoutDirection(Qt.LayoutDirection)
YCrossSection.setLocale(QLocale)
YCrossSection.setMask(QBitmap)

QWidget.setMask(QRegion)

YCrossSection.setMaximumHeight(int)
YCrossSection.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

YCrossSection.setMaximumWidth(int)
YCrossSection.setMinimumHeight(int)
YCrossSection.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

YCrossSection.setMinimumWidth(int)
YCrossSection.setMouseTracking(bool)
YCrossSection.setObjectName(QString)
YCrossSection.setPalette(QPalette)
YCrossSection.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

YCrossSection.setProperty(str, QVariant) → bool
YCrossSection.setShortcutAutoRepeat(int, bool enabled=True)
YCrossSection.setShortcutEnabled(int, bool enabled=True)
YCrossSection.setShown(bool)
YCrossSection.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

YCrossSection.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

YCrossSection.setStatusTip(QString)
YCrossSection.setStyle(QStyle)
YCrossSection.setStyleSheet(QString)
YCrossSection.setTabOrder(QWidget, QWidget)
YCrossSection.setToolTip(QString)
YCrossSection.setUpdatesEnabled(bool)
YCrossSection.setVisible(bool)
YCrossSection.setWhatsThis(QString)
YCrossSection.setWindowFilePath(QString)
YCrossSection.setWindowFlags(Qt.WindowFlags)
YCrossSection.setWindowIcon(QIcon)
YCrossSection.setWindowIconText(QString)
YCrossSection.setWindowModality(Qt.WindowModality)
YCrossSection.setWindowModified(bool)
YCrossSection.setWindowOpacity(float)
YCrossSection.setWindowRole(QString)
YCrossSection.setWindowState(Qt.WindowStates)
YCrossSection.setWindowTitle(QString)
YCrossSection.show()
YCrossSection.showFullScreen()
YCrossSection.showMaximized()
YCrossSection.showMinimized()
YCrossSection.showNormal()
YCrossSection.signalsBlocked() → bool
YCrossSection.size() → QSize
YCrossSection.sizeHint() → QSize
YCrossSection.sizeIncrement() → QSize
YCrossSection.sizePolicy() → QSizePolicy
YCrossSection.stackUnder(QWidget)
YCrossSection.startTimer(int) → int
YCrossSection.statusTip() → QString
YCrossSection.style() → QStyle
YCrossSection.styleSheet() → QString
YCrossSection.tabletEvent(QTabletEvent)
YCrossSection.testAttribute(Qt.WidgetAttribute) → bool
YCrossSection.thread() → QThread
YCrossSection.timerEvent(QTimerEvent)
YCrossSection.toolTip() → QString
YCrossSection.topLevelWidget() → QWidget
YCrossSection.tr(str, str disambiguation=None, int n=-1) → QString
YCrossSection.trUtf8(str, str disambiguation=None, int n=-1) → QString
YCrossSection.underMouse() → bool
YCrossSection.ungrabGesture(Qt.GestureType)
YCrossSection.unsetCursor()
YCrossSection.unsetLayoutDirection()
YCrossSection.unsetLocale()
YCrossSection.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

YCrossSection.updateGeometry()
YCrossSection.updateMicroFocus()
YCrossSection.update_plot(obj=None)

Update cross section curve(s) associated to object obj

obj may be a marker or a rectangular shape (see guiqwt.tools.CrossSectionTool and guiqwt.tools.AverageCrossSectionTool)

If obj is None, update the cross sections of the last active object

YCrossSection.updatesEnabled() → bool
YCrossSection.visibility_changed(enable)

DockWidget visibility has changed

YCrossSection.visibleRegion() → QRegion
YCrossSection.whatsThis() → QString
YCrossSection.wheelEvent(QWheelEvent)
YCrossSection.width() → int
YCrossSection.widthMM() → int
YCrossSection.winId() → int
YCrossSection.window() → QWidget
YCrossSection.windowActivationChange(bool)
YCrossSection.windowFilePath() → QString
YCrossSection.windowFlags() → Qt.WindowFlags
YCrossSection.windowIcon() → QIcon
YCrossSection.windowIconText() → QString
YCrossSection.windowModality() → Qt.WindowModality
YCrossSection.windowOpacity() → float
YCrossSection.windowRole() → QString
YCrossSection.windowState() → Qt.WindowStates
YCrossSection.windowTitle() → QString
YCrossSection.windowType() → Qt.WindowType
YCrossSection.x() → int
YCrossSection.x11Info() → QX11Info
YCrossSection.x11PictureHandle() → int
YCrossSection.y() → int

guiqwt.annotations

The annotations module provides annotated shapes:

An annotated shape is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.

See also

module guiqwt.shapes

Examples

An annotated shape may be created:
  • from the associated plot item class (e.g. AnnotatedCircle to create an annotated circle): the item properties are then assigned by creating the appropriate style parameters object (guiqwt.styles.AnnotationParam)
>>> from guiqwt.annotations import AnnotatedCircle
>>> from guiqwt.styles import AnnotationParam
>>> param = AnnotationParam()
>>> param.title = 'My circle'
>>> circle_item = AnnotatedCircle(0., 2., 4., 0., param)
  • or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> circle_item = make.annotated_circle(0., 2., 4., 0., title='My circle')

Reference

class guiqwt.annotations.AnnotatedPoint(x=0, y=0, annotationparam=None)[source]

Construct an annotated point at coordinates (x, y) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()[source]

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_center()

Return shape center coordinates: (xc, yc)

get_infos()[source]

Return formatted string with informations on current shape

get_pos()[source]

Return the point coordinates

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_center()

Return shape center coordinates after applying transform matrix

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_size()

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()[source]

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

set_movable(state)

Set item movable state

set_pos(x, y)[source]

Set the point coordinates to (x, y)

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

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

class guiqwt.annotations.AnnotatedSegment(x1=0, y1=0, x2=0, y2=0, annotationparam=None)[source]

Construct an annotated segment between coordinates (x1, y1) and (x2, y2) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_center()

Return shape center coordinates: (xc, yc)

get_infos()[source]

Return formatted string with informations on current shape

get_rect()[source]

Return the coordinates of the shape’s top-left and bottom-right corners

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_center()

Return shape center coordinates after applying transform matrix

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_length()[source]

Return segment length after applying transform matrix

get_tr_size()

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()[source]

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x1, y1, x2, y2)[source]

Set the coordinates of the shape’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).

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

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

class guiqwt.annotations.AnnotatedRectangle(x1=0, y1=0, x2=0, y2=0, annotationparam=None)[source]

Construct an annotated rectangle between coordinates (x1, y1) and (x2, y2) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_center()

Return shape center coordinates: (xc, yc)

get_computations_text()[source]

Return formatted string with informations on current shape

get_infos()[source]

Return formatted string with informations on current shape

get_rect()[source]

Return the coordinates of the shape’s top-left and bottom-right corners

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_center()[source]

Return shape center coordinates after applying transform matrix

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_size()[source]

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()[source]

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x1, y1, x2, y2)[source]

Set the coordinates of the shape’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).

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

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

class guiqwt.annotations.AnnotatedObliqueRectangle(x0=0, y0=0, x1=0, y1=0, x2=0, y2=0, x3=0, y3=0, annotationparam=None)[source]

Construct an annotated oblique rectangle between coordinates (x0, y0), (x1, y1), (x2, y2) and (x3, y3) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()[source]

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()[source]

Return bounding rectangle coordinates (in plot coordinates)

get_center()

Return shape center coordinates: (xc, yc)

get_computations_text()

Return formatted string with informations on current shape

get_infos()[source]

Return formatted string with informations on current shape

get_rect()

Return the coordinates of the shape’s top-left and bottom-right corners

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_angle()[source]

Return X-diameter angle with horizontal direction, after applying transform matrix

get_tr_center()

Return shape center coordinates after applying transform matrix

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_size()[source]

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()[source]

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x0, y0, x1, y1, x2, y2, x3, y3)[source]

Set the rectangle corners coordinates: (x0, y0): top-left corner (x1, y1): top-right corner (x2, y2): bottom-right corner (x3, y3): bottom-left corner

x: additionnal points

(x0, y0)——>(x1, y1)
↑ | | | x x | | | ↓

(x3, y3)<——(x2, y2)

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

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

class guiqwt.annotations.AnnotatedEllipse(x1=0, y1=0, x2=0, y2=0, annotationparam=None)[source]

Construct an annotated ellipse with X-axis diameter between coordinates (x1, y1) and (x2, y2) and properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_center()

Return shape center coordinates: (xc, yc)

get_infos()[source]

Return formatted string with informations on current shape

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_angle()[source]

Return X-diameter angle with horizontal direction, after applying transform matrix

get_tr_center()[source]

Return center coordinates: (xc, yc)

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_size()[source]

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

get_xdiameter()[source]

Return the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here

get_ydiameter()[source]

Return the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()[source]

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

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

set_xdiameter(x0, y0, x1, y1)[source]

Set the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here

set_ydiameter(x2, y2, x3, y3)[source]

Set the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

class guiqwt.annotations.AnnotatedCircle(x1=0, y1=0, x2=0, y2=0, annotationparam=None)[source]

Construct an annotated circle with diameter between coordinates (x1, y1) and (x2, y2) and properties set with annotationparam (see guiqwt.styles.AnnotationParam)

create_label()

Return the label object associated to this annotated shape object

create_shape()

Return the shape object associated to this annotated shape object

deserialize(reader)

Deserialize object from HDF5 reader

get_center()

Return shape center coordinates: (xc, yc)

get_infos()[source]

Return formatted string with informations on current shape

get_text()

Return text associated to current shape (see guiqwt.label.ObjectInfo)

get_tr_angle()

Return X-diameter angle with horizontal direction, after applying transform matrix

get_tr_center()

Return center coordinates: (xc, yc)

get_tr_center_str()

Return center coordinates as a string (with units)

get_tr_diameter()[source]

Return circle diameter after applying transform matrix

get_tr_size()

Return shape size after applying transform matrix

get_tr_size_str()

Return size as a string (with units)

get_xdiameter()

Return the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here

get_ydiameter()

Return the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here

is_label_visible()

Return True if associated label is visible

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_label_position()

Set label position, for instance based on shape position

set_label_visible(state)

Set the annotated shape’s label visibility

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

set_xdiameter(x0, y0, x1, y1)

Set the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here

set_ydiameter(x2, y2, x3, y3)

Set the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here

unselect()

Unselect item

update_label()

Update the annotated shape’s label contents

x_to_str(x)

Convert x (float) to a string (with associated unit and uncertainty)

y_to_str(y)

Convert y (float) to a string (with associated unit and uncertainty)

guiqwt.shapes

The shapes module provides geometrical shapes:

A shape is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.

See also

module guiqwt.annotations

Examples

A shape may be created:
  • from the associated plot item class (e.g. RectangleShape to create a rectangle): the item properties are then assigned by creating the appropriate style parameters object (guiqwt.styles.ShapeParam)
>>> from guiqwt.shapes import RectangleShape
>>> from guiqwt.styles import ShapeParam
>>> param = ShapeParam()
>>> param.title = 'My rectangle'
>>> rect_item = RectangleShape(0., 2., 4., 0., param)
  • or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> rect_item = make.rectangle(0., 2., 4., 0., title='My rectangle')

Reference

class guiqwt.shapes.PolygonShape(points=None, closed=None, shapeparam=None)[source]
deserialize(reader)[source]

Deserialize object from HDF5 reader

get_bounding_rect_coords()[source]

Return bounding rectangle coordinates (in plot coordinates)

get_points()[source]

Return polygon points

hit_test(pos)[source]

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

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

unselect()

Unselect item

class guiqwt.shapes.RectangleShape(x1=0, y1=0, x2=0, y2=0, shapeparam=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_center()[source]

Return center coordinates: (xc, yc)

get_points()

Return polygon points

hit_test(pos)

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x1, y1, x2, y2)[source]

Set the coordinates of the rectangle’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).

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

unselect()

Unselect item

class guiqwt.shapes.ObliqueRectangleShape(x0=0, y0=0, x1=0, y1=0, x2=0, y2=0, x3=0, y3=0, shapeparam=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_center()[source]

Return center coordinates: (xc, yc)

get_points()

Return polygon points

hit_test(pos)

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x0, y0, x1, y1, x2, y2, x3, y3)[source]

Set the rectangle corners coordinates: (x0, y0): top-left corner (x1, y1): top-right corner (x2, y2): bottom-right corner (x3, y3): bottom-left corner

x: additionnal points (handles used for rotation – other handles being used for rectangle resizing)

(x0, y0)——>(x1, y1)
↑ | | | x x | | | ↓

(x3, y3)<——(x2, y2)

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

unselect()

Unselect item

class guiqwt.shapes.PointShape(x=0, y=0, shapeparam=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_points()

Return polygon points

get_pos()[source]

Return the point coordinates

hit_test(pos)

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_movable(state)

Set item movable state

set_pos(x, y)[source]

Set the point coordinates to (x, y)

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

unselect()

Unselect item

class guiqwt.shapes.SegmentShape(x1=0, y1=0, x2=0, y2=0, shapeparam=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_points()

Return polygon points

hit_test(pos)

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x1, y1, x2, y2)[source]

Set the start point of this segment to (x1, y1) and the end point of this line to (x2, y2)

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

unselect()

Unselect item

class guiqwt.shapes.EllipseShape(x1=0, y1=0, x2=0, y2=0, shapeparam=None)[source]
compute_elements(xMap, yMap)[source]

Return points, lines and ellipse rect

deserialize(reader)

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_center()[source]

Return center coordinates: (xc, yc)

get_points()

Return polygon points

get_rect()[source]

Circle only!

get_xdiameter()[source]

Return the coordinates of the ellipse’s X-axis diameter

get_ydiameter()[source]

Return the coordinates of the ellipse’s Y-axis diameter

hit_test(pos)[source]

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

set_movable(state)

Set item movable state

set_private(state)

Set object as private

set_readonly(state)

Set object readonly state

set_rect(x0, y0, x1, y1)[source]

Circle only!

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

set_xdiameter(x0, y0, x1, y1)[source]

Set the coordinates of the ellipse’s X-axis diameter

set_ydiameter(x2, y2, x3, y3)[source]

Set the coordinates of the ellipse’s Y-axis diameter

unselect()

Unselect item

class guiqwt.shapes.Axes(p0=(0, 0), p1=(0, 0), p2=(0, 0), axesparam=None, shapeparam=None)[source]

Axes( (0,1), (1,1), (0,0) )

deserialize(reader)[source]

Deserialize object from HDF5 reader

get_bounding_rect_coords()

Return bounding rectangle coordinates (in plot coordinates)

get_points()

Return polygon points

hit_test(pos)

return (dist, handle, inside)

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

move_local_shape(old_pos, new_pos)

Translate the shape such that old_pos becomes new_pos in canvas coordinates

move_shape(old_pos, new_pos)[source]

Overriden to emit the axes_changed signal

move_with_selection(delta_x, delta_y)

Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

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

unselect()

Unselect item

class guiqwt.shapes.XRangeSelection(_min, _max, shapeparam=None)[source]
is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)[source]

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

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

types()

Returns a group or category for this item this should be a class object inheriting from IItemType

unselect()

Unselect item

guiqwt.label

The labels module provides plot items related to labels and legends:
  • guiqwt.shapes.LabelItem
  • guiqwt.shapes.LegendBoxItem
  • guiqwt.shapes.SelectedLegendBoxItem
  • guiqwt.shapes.RangeComputation
  • guiqwt.shapes.RangeComputation2d
  • guiqwt.shapes.DataInfoLabel

A label or a legend is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.

Reference

class guiqwt.label.LabelItem(text=None, labelparam=None)[source]
deserialize(reader)[source]

Deserialize object from HDF5 reader

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)[source]

Serialize object to HDF5 writer

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

unselect()

Unselect item

class guiqwt.label.LegendBoxItem(labelparam=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

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

unselect()

Unselect item

class guiqwt.label.SelectedLegendBoxItem(dataset=None, itemlist=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

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

unselect()

Unselect item

class guiqwt.label.RangeComputation(label, curve, xrangeselection, function=None)[source]

ObjectInfo showing curve computations relative to a XRangeSelection shape.

label: formatted string curve: CurveItem object xrangeselection: XRangeSelection object function: input arguments are x, y arrays (extraction of arrays corresponding to the xrangeselection X-axis range)

class guiqwt.label.RangeComputation2d(label, image, rect, function)[source]
class guiqwt.label.DataInfoLabel(labelparam=None, infos=None)[source]
deserialize(reader)

Deserialize object from HDF5 reader

is_private()

Return True if object is private

is_readonly()

Return object readonly state

move_local_point_to(handle, pos, ctrl=None)

Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise

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

select()

Select item

serialize(writer)

Serialize object to HDF5 writer

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

unselect()

Unselect item

guiqwt.tools

The tools module provides a collection of plot tools :

A plot tool is an object providing various features to a plotting widget (guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot): buttons, menus, selection tools, image I/O tools, etc. To make it work, a tool has to be registered to the plotting widget’s manager, i.e. an instance of the guiqwt.plot.PlotManager class (see the guiqwt.plot module for more details on the procedure).

The CurvePlot and ImagePlot widgets do not provide any PlotManager: the manager has to be created separately. On the contrary, the ready-to-use widgets guiqwt.plot.CurveWidget and guiqwt.plot.ImageWidget are higher-level plotting widgets with integrated manager, tools and panels.

See also

Module guiqwt.plot
Module providing ready-to-use curve and image plotting widgets and dialog boxes
Module guiqwt.curve
Module providing curve-related plot items and plotting widgets
Module guiqwt.image
Module providing image-related plot items and plotting widgets

Example

The following example add all the existing tools to an ImageWidget object for testing purpose:

import os.path as osp

from guiqwt.plot import ImageDialog
from guiqwt.tools import (RectangleTool, EllipseTool, HRangeTool, PlaceAxesTool,
                          MultiLineTool, FreeFormTool, SegmentTool, CircleTool,
                          AnnotatedRectangleTool, AnnotatedEllipseTool,
                          AnnotatedSegmentTool, AnnotatedCircleTool, LabelTool,
                          AnnotatedPointTool,
                          VCursorTool, HCursorTool, XCursorTool,
                          ObliqueRectangleTool, AnnotatedObliqueRectangleTool)
from guiqwt.builder import make

def create_window():
    win = ImageDialog(edit=False, toolbar=True,
                      wintitle="All image and plot tools test")
    for toolklass in (LabelTool, HRangeTool,
                      VCursorTool, HCursorTool, XCursorTool,
                      SegmentTool, RectangleTool, ObliqueRectangleTool,
                      CircleTool, EllipseTool,
                      MultiLineTool, FreeFormTool, PlaceAxesTool,
                      AnnotatedRectangleTool, AnnotatedObliqueRectangleTool,
                      AnnotatedCircleTool, AnnotatedEllipseTool,
                      AnnotatedSegmentTool, AnnotatedPointTool):
        win.add_tool(toolklass)
    return win

def test():
    """Test"""
    # -- Create QApplication
    import guidata
    _app = guidata.qapplication()
    # --
    filename = osp.join(osp.dirname(__file__), "brain.png")
    win = create_window()
    image = make.image(filename=filename, colormap="bone")
    plot = win.get_plot()
    plot.add_item(image)
    win.exec_()

if __name__ == "__main__":
    test()
_images/image_plot_tools.png

Reference

class guiqwt.tools.RectZoomTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SelectTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]

Graphical Object Selection Tool

activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SelectPointTool(manager, mode=u'reuse', on_active_item=False, title=None, icon=None, tip=None, end_callback=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, marker_style=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.MultiLineTool(manager, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
mouse_press(filter, event)[source]

We create a new shape if it’s the first point otherwise we add a new point

mouse_release(filter, event)[source]

Releasing the mouse button validate the last point position

move(filter, event)[source]

moving while holding the button down lets the user position the last created point

moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.FreeFormTool(manager, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
cancel_point(filter, event)[source]

Reimplement base class method

childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
mouse_press(filter, event)[source]

Reimplement base class method

mouse_release(filter, event)

Releasing the mouse button validate the last point position

move(filter, event)

moving while holding the button down lets the user position the last created point

moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.LabelTool(manager, handle_label_cb=None, label_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.RectangleTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.PointTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SegmentTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.CircleTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.EllipseTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.PlaceAxesTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AnnotatedRectangleTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AnnotatedCircleTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AnnotatedEllipseTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AnnotatedPointTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AnnotatedSegmentTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

handle_final_shape(shape)

To be reimplemented

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_shape(shape)

To be reimplemented

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.HRangeTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.DummySeparatorTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)[source]

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AntiAliasingTool(manager)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.DisplayCoordsTool(manager)[source]
blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)[source]

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.ReverseYAxisTool(manager)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.AspectRatioTool(manager)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)[source]

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
lock_aspect_ratio(checked)[source]

Lock aspect ratio

metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.PanelTool(manager)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.ItemListPanelTool(manager)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.ContrastPanelTool(manager)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.ColormapTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)[source]

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.XCSPanelTool(manager)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.YCSPanelTool(manager)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.CrossSectionTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()[source]

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AverageCrossSectionTool(manager, setup_shape_cb=None, handle_final_shape_cb=None, shape_style=None, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>, title=None, icon=None, tip=None, switch_to_default_tool=None)[source]
activate()

Activate tool

add_shape_to_plot(plot, p0, p1)

Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SaveAsTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.CopyToClipboardTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.OpenFileTool(manager, title=u'Open...', formats=u'*.*', toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.OpenImageTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SnapshotTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate()

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

cursor()

Return tool mouse cursor

customEvent(QEvent)
deactivate()

Deactivate tool

deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

get_shape()

Reimplemented RectangularActionTool method

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_context_menu(menu, plot)

If the tool supports it, this method should install an action in the context menu

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.PrintTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.SaveItemsTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.LoadItemsTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.AxisScaleTool(manager)[source]
blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)[source]

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.HelpTool(manager, toolbar_id=<class guiqwt.tools.DefaultToolbarID at 0x2c67960>)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
update_status(plot)

called by to allow derived classes to update the states of actions based on the currently active BasePlot

can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)

class guiqwt.tools.ExportItemDataTool(manager, toolbar_id=None)[source]
activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.EditItemDataTool(manager, toolbar_id=None)[source]

Edit item data (requires spyderlib)

activate_command(plot, checked)

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.ItemCenterTool(manager, toolbar_id=None)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString
class guiqwt.tools.DeleteItemTool(manager, toolbar_id=None)[source]
activate_command(plot, checked)[source]

Activate tool

blockSignals(bool) → bool
childEvent(QChildEvent)
children() → list-of-QObject
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

connectNotify(SIGNAL())
create_action(manager)

Create and return tool’s action

create_action_menu(manager)

Create and return menu for the tool’s action

customEvent(QEvent)
deleteLater()
destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

disconnectNotify(SIGNAL())
dumpObjectInfo()
dumpObjectTree()
dynamicPropertyNames() → list-of-QByteArray
emit(SIGNAL(), ...)
event(QEvent) → bool
eventFilter(QObject, QEvent) → bool
findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

inherits(str) → bool
installEventFilter(QObject)
isWidgetType() → bool
killTimer(int)
metaObject() → QMetaObject
moveToThread(QThread)
objectName() → QString
parent() → QObject
property(str) → QVariant
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.

receivers(SIGNAL()) → int
register_plot(baseplot)

Every BasePlot using this tool should call register_plot to notify the tool about this widget using it

removeEventFilter(QObject)
sender() → QObject
senderSignalIndex() → int
setObjectName(QString)
setParent(QObject)
setProperty(str, QVariant) → bool
set_parent_tool(tool)

Used to organize tools automatically in menu items

setup_toolbar(toolbar)

Setup tool’s toolbar

signalsBlocked() → bool
startTimer(int) → int
thread() → QThread
timerEvent(QTimerEvent)
tr(str, str disambiguation=None, int n=-1) → QString
trUtf8(str, str disambiguation=None, int n=-1) → QString

guiqwt.styles

The styles module provides set of parameters (DataSet classes) to configure plot items and plot tools.

See also

Module guiqwt.plot
Module providing ready-to-use curve and image plotting widgets and dialog boxes
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.tools
Module providing the plot tools

Reference

class guiqwt.styles.CurveParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.ErrorBarParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.GridParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.ImageParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.TrImageParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.ImageFilterParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.HistogramParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.Histogram2DParam(title=None, comment=None, icon=u'')[source]

Histogram

accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.AxesParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.ImageAxesParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.LabelParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.LegendParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.ShapeParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.AnnotationParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.AxesShapeParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.RangeShapeParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.MarkerParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

set_markerstyle(style)[source]

Set marker line style style:

  • convenient values: ‘+’, ‘-‘, ‘|’ or None
  • QwtPlotMarker.NoLine, QwtPlotMarker.Vertical, ...
text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.FontParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.SymbolParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.LineStyleParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

set_style_from_matlab(linestyle)[source]

Eventually convert MATLAB-like linestyle into Qt linestyle

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.BrushStyleParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

class guiqwt.styles.TextStyleParam(title=None, comment=None, icon=u'')[source]
accept(vis)

helper function that passes the visitor to the accept methods of all the items in this dataset

check()

Check the dataset item values

edit(parent=None, apply=None, size=None)

Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))

get_comment()

Return data set comment

get_icon()

Return data set icon

get_title()

Return data set title

set_defaults()

Set default values

text_edit()

Edit data set with text input only

to_string(debug=False, indent=None, align=False)

Return readable string representation of the data set If debug is True, add more details on data items

update_param(obj)[source]

obj: QwtText instance

update_text(obj)[source]

obj: QwtText instance

view(parent=None, size=None)

Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))

guiqwt.io

The io module provides input/output helper functions:

Reference

guiqwt.io.imread(fname, ext=None, to_grayscale=False)[source]

Return a NumPy array from an image filename fname.

If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename.

guiqwt.io.imwrite(fname, arr, ext=None, dtype=None, max_range=None, **kwargs)[source]

Save a NumPy array to an image filename fname.

If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename. If max_range is True, array data is scaled to fit the dtype (or data type itself if dtype is None) dynamic range Warning: option max_range changes data in place

guiqwt.io.load_items(reader)[source]

Load items from HDF5 file: * reader: guidata.hdf5io.HDF5Reader object

guiqwt.io.save_items(writer, items)[source]

Save items to HDF5 file: * writer: guidata.hdf5io.HDF5Writer object * items: serializable plot items

resizedialog

The resizedialog module provides a dialog box providing essential GUI for entering parameters needed to resize an image: guiqwt.widgets.resizedialog.ResizeDialog.

Reference

class guiqwt.widgets.resizedialog.ResizeDialog(parent, new_size, old_size, text='')[source]
class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

ResizeDialog.accept()
ResizeDialog.acceptDrops() → bool
ResizeDialog.accepted

QDialog.accepted [signal]

ResizeDialog.accessibleDescription() → QString
ResizeDialog.accessibleName() → QString
ResizeDialog.actionEvent(QActionEvent)
ResizeDialog.actions() → list-of-QAction
ResizeDialog.activateWindow()
ResizeDialog.addAction(QAction)
ResizeDialog.addActions(list-of-QAction)
ResizeDialog.adjustSize()
ResizeDialog.autoFillBackground() → bool
ResizeDialog.backgroundRole() → QPalette.ColorRole
ResizeDialog.baseSize() → QSize
ResizeDialog.blockSignals(bool) → bool
ResizeDialog.changeEvent(QEvent)
ResizeDialog.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

ResizeDialog.childEvent(QChildEvent)
ResizeDialog.children() → list-of-QObject
ResizeDialog.childrenRect() → QRect
ResizeDialog.childrenRegion() → QRegion
ResizeDialog.clearFocus()
ResizeDialog.clearMask()
ResizeDialog.close() → bool
ResizeDialog.closeEvent(QCloseEvent)
ResizeDialog.colorCount() → int
ResizeDialog.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

ResizeDialog.connectNotify(SIGNAL())
ResizeDialog.contentsMargins() → QMargins
ResizeDialog.contentsRect() → QRect
ResizeDialog.contextMenuEvent(QContextMenuEvent)
ResizeDialog.contextMenuPolicy() → Qt.ContextMenuPolicy
ResizeDialog.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
ResizeDialog.cursor() → QCursor
ResizeDialog.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

ResizeDialog.customEvent(QEvent)
ResizeDialog.deleteLater()
ResizeDialog.depth() → int
ResizeDialog.destroy(bool destroyWindow=True, bool destroySubWindows=True)
ResizeDialog.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

ResizeDialog.devType() → int
ResizeDialog.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

ResizeDialog.disconnectNotify(SIGNAL())
ResizeDialog.done(int)
ResizeDialog.dragEnterEvent(QDragEnterEvent)
ResizeDialog.dragLeaveEvent(QDragLeaveEvent)
ResizeDialog.dragMoveEvent(QDragMoveEvent)
ResizeDialog.dropEvent(QDropEvent)
ResizeDialog.dumpObjectInfo()
ResizeDialog.dumpObjectTree()
ResizeDialog.dynamicPropertyNames() → list-of-QByteArray
ResizeDialog.effectiveWinId() → int
ResizeDialog.emit(SIGNAL(), ...)
ResizeDialog.enabledChange(bool)
ResizeDialog.ensurePolished()
ResizeDialog.enterEvent(QEvent)
ResizeDialog.event(QEvent) → bool
ResizeDialog.eventFilter(QObject, QEvent) → bool
ResizeDialog.exec_() → int
ResizeDialog.extension() → QWidget
ResizeDialog.find(int) → QWidget
ResizeDialog.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

ResizeDialog.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

ResizeDialog.finished

QDialog.finished[int] [signal]

ResizeDialog.focusInEvent(QFocusEvent)
ResizeDialog.focusNextChild() → bool
ResizeDialog.focusNextPrevChild(bool) → bool
ResizeDialog.focusOutEvent(QFocusEvent)
ResizeDialog.focusPolicy() → Qt.FocusPolicy
ResizeDialog.focusPreviousChild() → bool
ResizeDialog.focusProxy() → QWidget
ResizeDialog.focusWidget() → QWidget
ResizeDialog.font() → QFont
ResizeDialog.fontChange(QFont)
ResizeDialog.fontInfo() → QFontInfo
ResizeDialog.fontMetrics() → QFontMetrics
ResizeDialog.foregroundRole() → QPalette.ColorRole
ResizeDialog.frameGeometry() → QRect
ResizeDialog.frameSize() → QSize
ResizeDialog.geometry() → QRect
ResizeDialog.getContentsMargins() -> (int, int, int, int)
ResizeDialog.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
ResizeDialog.grabKeyboard()
ResizeDialog.grabMouse()

QWidget.grabMouse(QCursor)

ResizeDialog.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
ResizeDialog.graphicsEffect() → QGraphicsEffect
ResizeDialog.graphicsProxyWidget() → QGraphicsProxyWidget
ResizeDialog.handle() → int
ResizeDialog.hasFocus() → bool
ResizeDialog.hasMouseTracking() → bool
ResizeDialog.height() → int
ResizeDialog.heightForWidth(int) → int
ResizeDialog.heightMM() → int
ResizeDialog.hide()
ResizeDialog.hideEvent(QHideEvent)
ResizeDialog.inherits(str) → bool
ResizeDialog.inputContext() → QInputContext
ResizeDialog.inputMethodEvent(QInputMethodEvent)
ResizeDialog.inputMethodHints() → Qt.InputMethodHints
ResizeDialog.inputMethodQuery(Qt.InputMethodQuery) → QVariant
ResizeDialog.insertAction(QAction, QAction)
ResizeDialog.insertActions(QAction, list-of-QAction)
ResizeDialog.installEventFilter(QObject)
ResizeDialog.isActiveWindow() → bool
ResizeDialog.isAncestorOf(QWidget) → bool
ResizeDialog.isEnabled() → bool
ResizeDialog.isEnabledTo(QWidget) → bool
ResizeDialog.isEnabledToTLW() → bool
ResizeDialog.isFullScreen() → bool
ResizeDialog.isHidden() → bool
ResizeDialog.isLeftToRight() → bool
ResizeDialog.isMaximized() → bool
ResizeDialog.isMinimized() → bool
ResizeDialog.isModal() → bool
ResizeDialog.isRightToLeft() → bool
ResizeDialog.isSizeGripEnabled() → bool
ResizeDialog.isTopLevel() → bool
ResizeDialog.isVisible() → bool
ResizeDialog.isVisibleTo(QWidget) → bool
ResizeDialog.isWidgetType() → bool
ResizeDialog.isWindow() → bool
ResizeDialog.isWindowModified() → bool
ResizeDialog.keyPressEvent(QKeyEvent)
ResizeDialog.keyReleaseEvent(QKeyEvent)
ResizeDialog.keyboardGrabber() → QWidget
ResizeDialog.killTimer(int)
ResizeDialog.languageChange()
ResizeDialog.layout() → QLayout
ResizeDialog.layoutDirection() → Qt.LayoutDirection
ResizeDialog.leaveEvent(QEvent)
ResizeDialog.locale() → QLocale
ResizeDialog.logicalDpiX() → int
ResizeDialog.logicalDpiY() → int
ResizeDialog.lower()
ResizeDialog.mapFrom(QWidget, QPoint) → QPoint
ResizeDialog.mapFromGlobal(QPoint) → QPoint
ResizeDialog.mapFromParent(QPoint) → QPoint
ResizeDialog.mapTo(QWidget, QPoint) → QPoint
ResizeDialog.mapToGlobal(QPoint) → QPoint
ResizeDialog.mapToParent(QPoint) → QPoint
ResizeDialog.mask() → QRegion
ResizeDialog.maximumHeight() → int
ResizeDialog.maximumSize() → QSize
ResizeDialog.maximumWidth() → int
ResizeDialog.metaObject() → QMetaObject
ResizeDialog.metric(QPaintDevice.PaintDeviceMetric) → int
ResizeDialog.minimumHeight() → int
ResizeDialog.minimumSize() → QSize
ResizeDialog.minimumSizeHint() → QSize
ResizeDialog.minimumWidth() → int
ResizeDialog.mouseDoubleClickEvent(QMouseEvent)
ResizeDialog.mouseGrabber() → QWidget
ResizeDialog.mouseMoveEvent(QMouseEvent)
ResizeDialog.mousePressEvent(QMouseEvent)
ResizeDialog.mouseReleaseEvent(QMouseEvent)
ResizeDialog.move(QPoint)

QWidget.move(int, int)

ResizeDialog.moveEvent(QMoveEvent)
ResizeDialog.moveToThread(QThread)
ResizeDialog.nativeParentWidget() → QWidget
ResizeDialog.nextInFocusChain() → QWidget
ResizeDialog.normalGeometry() → QRect
ResizeDialog.numColors() → int
ResizeDialog.objectName() → QString
ResizeDialog.open()
ResizeDialog.orientation() → Qt.Orientation
ResizeDialog.overrideWindowFlags(Qt.WindowFlags)
ResizeDialog.overrideWindowState(Qt.WindowStates)
ResizeDialog.paintEngine() → QPaintEngine
ResizeDialog.paintEvent(QPaintEvent)
ResizeDialog.paintingActive() → bool
ResizeDialog.palette() → QPalette
ResizeDialog.paletteChange(QPalette)
ResizeDialog.parent() → QObject
ResizeDialog.parentWidget() → QWidget
ResizeDialog.physicalDpiX() → int
ResizeDialog.physicalDpiY() → int
ResizeDialog.pos() → QPoint
ResizeDialog.previousInFocusChain() → QWidget
ResizeDialog.property(str) → QVariant
ResizeDialog.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.

ResizeDialog.raise_()
ResizeDialog.receivers(SIGNAL()) → int
ResizeDialog.rect() → QRect
ResizeDialog.reject()
ResizeDialog.rejected

QDialog.rejected [signal]

ResizeDialog.releaseKeyboard()
ResizeDialog.releaseMouse()
ResizeDialog.releaseShortcut(int)
ResizeDialog.removeAction(QAction)
ResizeDialog.removeEventFilter(QObject)
ResizeDialog.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)

ResizeDialog.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

ResizeDialog.resetInputContext()
ResizeDialog.resize(QSize)

QWidget.resize(int, int)

ResizeDialog.resizeEvent(QResizeEvent)
ResizeDialog.restoreGeometry(QByteArray) → bool
ResizeDialog.result() → int
ResizeDialog.saveGeometry() → QByteArray
ResizeDialog.scroll(int, int)

QWidget.scroll(int, int, QRect)

ResizeDialog.sender() → QObject
ResizeDialog.senderSignalIndex() → int
ResizeDialog.setAcceptDrops(bool)
ResizeDialog.setAccessibleDescription(QString)
ResizeDialog.setAccessibleName(QString)
ResizeDialog.setAttribute(Qt.WidgetAttribute, bool on=True)
ResizeDialog.setAutoFillBackground(bool)
ResizeDialog.setBackgroundRole(QPalette.ColorRole)
ResizeDialog.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

ResizeDialog.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

ResizeDialog.setContextMenuPolicy(Qt.ContextMenuPolicy)
ResizeDialog.setCursor(QCursor)
ResizeDialog.setDisabled(bool)
ResizeDialog.setEnabled(bool)
ResizeDialog.setExtension(QWidget)
ResizeDialog.setFixedHeight(int)
ResizeDialog.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

ResizeDialog.setFixedWidth(int)
ResizeDialog.setFocus()

QWidget.setFocus(Qt.FocusReason)

ResizeDialog.setFocusPolicy(Qt.FocusPolicy)
ResizeDialog.setFocusProxy(QWidget)
ResizeDialog.setFont(QFont)
ResizeDialog.setForegroundRole(QPalette.ColorRole)
ResizeDialog.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

ResizeDialog.setGraphicsEffect(QGraphicsEffect)
ResizeDialog.setHidden(bool)
ResizeDialog.setInputContext(QInputContext)
ResizeDialog.setInputMethodHints(Qt.InputMethodHints)
ResizeDialog.setLayout(QLayout)
ResizeDialog.setLayoutDirection(Qt.LayoutDirection)
ResizeDialog.setLocale(QLocale)
ResizeDialog.setMask(QBitmap)

QWidget.setMask(QRegion)

ResizeDialog.setMaximumHeight(int)
ResizeDialog.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

ResizeDialog.setMaximumWidth(int)
ResizeDialog.setMinimumHeight(int)
ResizeDialog.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

ResizeDialog.setMinimumWidth(int)
ResizeDialog.setModal(bool)
ResizeDialog.setMouseTracking(bool)
ResizeDialog.setObjectName(QString)
ResizeDialog.setOrientation(Qt.Orientation)
ResizeDialog.setPalette(QPalette)
ResizeDialog.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

ResizeDialog.setProperty(str, QVariant) → bool
ResizeDialog.setResult(int)
ResizeDialog.setShortcutAutoRepeat(int, bool enabled=True)
ResizeDialog.setShortcutEnabled(int, bool enabled=True)
ResizeDialog.setShown(bool)
ResizeDialog.setSizeGripEnabled(bool)
ResizeDialog.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

ResizeDialog.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

ResizeDialog.setStatusTip(QString)
ResizeDialog.setStyle(QStyle)
ResizeDialog.setStyleSheet(QString)
ResizeDialog.setTabOrder(QWidget, QWidget)
ResizeDialog.setToolTip(QString)
ResizeDialog.setUpdatesEnabled(bool)
ResizeDialog.setVisible(bool)
ResizeDialog.setWhatsThis(QString)
ResizeDialog.setWindowFilePath(QString)
ResizeDialog.setWindowFlags(Qt.WindowFlags)
ResizeDialog.setWindowIcon(QIcon)
ResizeDialog.setWindowIconText(QString)
ResizeDialog.setWindowModality(Qt.WindowModality)
ResizeDialog.setWindowModified(bool)
ResizeDialog.setWindowOpacity(float)
ResizeDialog.setWindowRole(QString)
ResizeDialog.setWindowState(Qt.WindowStates)
ResizeDialog.setWindowTitle(QString)
ResizeDialog.show()
ResizeDialog.showEvent(QShowEvent)
ResizeDialog.showExtension(bool)
ResizeDialog.showFullScreen()
ResizeDialog.showMaximized()
ResizeDialog.showMinimized()
ResizeDialog.showNormal()
ResizeDialog.signalsBlocked() → bool
ResizeDialog.size() → QSize
ResizeDialog.sizeHint() → QSize
ResizeDialog.sizeIncrement() → QSize
ResizeDialog.sizePolicy() → QSizePolicy
ResizeDialog.stackUnder(QWidget)
ResizeDialog.startTimer(int) → int
ResizeDialog.statusTip() → QString
ResizeDialog.style() → QStyle
ResizeDialog.styleSheet() → QString
ResizeDialog.tabletEvent(QTabletEvent)
ResizeDialog.testAttribute(Qt.WidgetAttribute) → bool
ResizeDialog.thread() → QThread
ResizeDialog.timerEvent(QTimerEvent)
ResizeDialog.toolTip() → QString
ResizeDialog.topLevelWidget() → QWidget
ResizeDialog.tr(str, str disambiguation=None, int n=-1) → QString
ResizeDialog.trUtf8(str, str disambiguation=None, int n=-1) → QString
ResizeDialog.underMouse() → bool
ResizeDialog.ungrabGesture(Qt.GestureType)
ResizeDialog.unsetCursor()
ResizeDialog.unsetLayoutDirection()
ResizeDialog.unsetLocale()
ResizeDialog.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

ResizeDialog.updateGeometry()
ResizeDialog.updateMicroFocus()
ResizeDialog.updatesEnabled() → bool
ResizeDialog.visibleRegion() → QRegion
ResizeDialog.whatsThis() → QString
ResizeDialog.wheelEvent(QWheelEvent)
ResizeDialog.width() → int
ResizeDialog.widthMM() → int
ResizeDialog.winId() → int
ResizeDialog.window() → QWidget
ResizeDialog.windowActivationChange(bool)
ResizeDialog.windowFilePath() → QString
ResizeDialog.windowFlags() → Qt.WindowFlags
ResizeDialog.windowIcon() → QIcon
ResizeDialog.windowIconText() → QString
ResizeDialog.windowModality() → Qt.WindowModality
ResizeDialog.windowOpacity() → float
ResizeDialog.windowRole() → QString
ResizeDialog.windowState() → Qt.WindowStates
ResizeDialog.windowTitle() → QString
ResizeDialog.windowType() → Qt.WindowType
ResizeDialog.x() → int
ResizeDialog.x11Info() → QX11Info
ResizeDialog.x11PictureHandle() → int
ResizeDialog.y() → int

rotatecrop

The rotatecrop module provides a dialog box providing essential GUI elements for rotating (arbitrary angle) and cropping an image:

Reference

class guiqwt.widgets.rotatecrop.RotateCropDialog(parent, wintitle=None, options=None, resize_to=None)[source]

Rotate & Crop Dialog

Rotate and crop a guiqwt.image.TrImageItem plot item

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

RotateCropDialog.accept()
RotateCropDialog.acceptDrops() → bool
RotateCropDialog.accept_changes()

Computed rotated/cropped array and apply changes to item

RotateCropDialog.accepted

QDialog.accepted [signal]

RotateCropDialog.accessibleDescription() → QString
RotateCropDialog.accessibleName() → QString
RotateCropDialog.actionEvent(QActionEvent)
RotateCropDialog.actions() → list-of-QAction
RotateCropDialog.activateWindow()
RotateCropDialog.activate_default_tool()

Activate default tool

RotateCropDialog.addAction(QAction)
RotateCropDialog.addActions(list-of-QAction)
RotateCropDialog.add_apply_button(layout)

Add the standard apply button

RotateCropDialog.add_buttons_to_layout(layout)

Add tool buttons to layout

RotateCropDialog.add_panel(panel)

Register a panel to the plot manager

Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
RotateCropDialog.add_plot(plot, plot_id=<class 'guiqwt.plot.DefaultPlotID'>)
Register a plot to the plot manager:
  • plot: guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot object
  • plot_id (default id is the plot object’s id: id(plot)): unique ID identifying the plot (any Python object), this ID will be asked by the manager to access this plot later.
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
RotateCropDialog.add_reset_button(layout)

Add the standard reset button

RotateCropDialog.add_separator_tool(toolbar_id=None)

Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu

RotateCropDialog.add_tool(ToolKlass, *args, **kwargs)
Register a tool to the manager
  • ToolKlass: tool’s class (guiqwt builtin tools are defined in module guiqwt.tools)
  • *args: arguments sent to the tool’s class
  • **kwargs: keyword arguments sent to the tool’s class
Plot manager’s registration sequence is the following:
  1. add plots
  2. add panels
  3. add tools
RotateCropDialog.add_toolbar(toolbar, toolbar_id='default')

Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)

RotateCropDialog.adjustSize()
RotateCropDialog.apply_transformation()

Apply transformation, e.g. crop or rotate

RotateCropDialog.autoFillBackground() → bool
RotateCropDialog.backgroundRole() → QPalette.ColorRole
RotateCropDialog.baseSize() → QSize
RotateCropDialog.blockSignals(bool) → bool
RotateCropDialog.changeEvent(QEvent)
RotateCropDialog.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

RotateCropDialog.childEvent(QChildEvent)
RotateCropDialog.children() → list-of-QObject
RotateCropDialog.childrenRect() → QRect
RotateCropDialog.childrenRegion() → QRegion
RotateCropDialog.clearFocus()
RotateCropDialog.clearMask()
RotateCropDialog.close() → bool
RotateCropDialog.closeEvent(QCloseEvent)
RotateCropDialog.colorCount() → int
RotateCropDialog.compute_transformation()

Compute transformation, return compute output array

RotateCropDialog.configure_panels()

Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)

RotateCropDialog.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

RotateCropDialog.connectNotify(SIGNAL())
RotateCropDialog.contentsMargins() → QMargins
RotateCropDialog.contentsRect() → QRect
RotateCropDialog.contextMenuEvent(QContextMenuEvent)
RotateCropDialog.contextMenuPolicy() → Qt.ContextMenuPolicy
RotateCropDialog.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
RotateCropDialog.create_plot(options, row=0, column=0, rowspan=1, columnspan=1)

Create the plotting widget (which is an instance of class guiqwt.plot.BaseImageWidget), add it to the dialog box main layout (guiqwt.plot.CurveDialog.plot_layout) and then add the item list, contrast adjustment and X/Y axes cross section panels.

May be overriden to customize the plot layout (guiqwt.plot.CurveDialog.plot_layout)

RotateCropDialog.cursor() → QCursor
RotateCropDialog.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

RotateCropDialog.customEvent(QEvent)
RotateCropDialog.deleteLater()
RotateCropDialog.depth() → int
RotateCropDialog.destroy(bool destroyWindow=True, bool destroySubWindows=True)
RotateCropDialog.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

RotateCropDialog.devType() → int
RotateCropDialog.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

RotateCropDialog.disconnectNotify(SIGNAL())
RotateCropDialog.done(int)
RotateCropDialog.dragEnterEvent(QDragEnterEvent)
RotateCropDialog.dragLeaveEvent(QDragLeaveEvent)
RotateCropDialog.dragMoveEvent(QDragMoveEvent)
RotateCropDialog.dropEvent(QDropEvent)
RotateCropDialog.dumpObjectInfo()
RotateCropDialog.dumpObjectTree()
RotateCropDialog.dynamicPropertyNames() → list-of-QByteArray
RotateCropDialog.effectiveWinId() → int
RotateCropDialog.emit(SIGNAL(), ...)
RotateCropDialog.enabledChange(bool)
RotateCropDialog.ensurePolished()
RotateCropDialog.enterEvent(QEvent)
RotateCropDialog.event(QEvent) → bool
RotateCropDialog.eventFilter(QObject, QEvent) → bool
RotateCropDialog.exec_() → int
RotateCropDialog.extension() → QWidget
RotateCropDialog.find(int) → QWidget
RotateCropDialog.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

RotateCropDialog.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

RotateCropDialog.finished

QDialog.finished[int] [signal]

RotateCropDialog.focusInEvent(QFocusEvent)
RotateCropDialog.focusNextChild() → bool
RotateCropDialog.focusNextPrevChild(bool) → bool
RotateCropDialog.focusOutEvent(QFocusEvent)
RotateCropDialog.focusPolicy() → Qt.FocusPolicy
RotateCropDialog.focusPreviousChild() → bool
RotateCropDialog.focusProxy() → QWidget
RotateCropDialog.focusWidget() → QWidget
RotateCropDialog.font() → QFont
RotateCropDialog.fontChange(QFont)
RotateCropDialog.fontInfo() → QFontInfo
RotateCropDialog.fontMetrics() → QFontMetrics
RotateCropDialog.foregroundRole() → QPalette.ColorRole
RotateCropDialog.frameGeometry() → QRect
RotateCropDialog.frameSize() → QSize
RotateCropDialog.geometry() → QRect
RotateCropDialog.getContentsMargins() -> (int, int, int, int)
RotateCropDialog.get_active_plot()

Return the active plot

The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot

RotateCropDialog.get_active_tool()

Return active tool

RotateCropDialog.get_context_menu(plot=None)

Return widget context menu – built using active tools

RotateCropDialog.get_contrast_panel()

Convenience function to get the contrast adjustment panel

Return None if the contrast adjustment panel has not been added to this manager

RotateCropDialog.get_default_plot()

Return default plot

The default plot is the plot on which tools and panels will act.

RotateCropDialog.get_default_tool()

Get default tool

RotateCropDialog.get_default_toolbar()

Return default toolbar

RotateCropDialog.get_itemlist_panel()

Convenience function to get the item list panel

Return None if the item list panel has not been added to this manager

RotateCropDialog.get_main()

Return the main (parent) widget

Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.

RotateCropDialog.get_panel(panel_id)

Return panel from its ID Panel IDs are listed in module guiqwt.panels

RotateCropDialog.get_plot(plot_id=<class 'guiqwt.plot.DefaultPlotID'>)

Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)

RotateCropDialog.get_plots()

Return all registered plots

RotateCropDialog.get_tool(ToolKlass)

Return tool instance from its class

RotateCropDialog.get_toolbar(toolbar_id='default')

Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)

RotateCropDialog.get_xcs_panel()

Convenience function to get the X-axis cross section panel

Return None if the X-axis cross section panel has not been added to this manager

RotateCropDialog.get_ycs_panel()

Convenience function to get the Y-axis cross section panel

Return None if the Y-axis cross section panel has not been added to this manager

RotateCropDialog.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
RotateCropDialog.grabKeyboard()
RotateCropDialog.grabMouse()

QWidget.grabMouse(QCursor)

RotateCropDialog.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
RotateCropDialog.graphicsEffect() → QGraphicsEffect
RotateCropDialog.graphicsProxyWidget() → QGraphicsProxyWidget
RotateCropDialog.handle() → int
RotateCropDialog.hasFocus() → bool
RotateCropDialog.hasMouseTracking() → bool
RotateCropDialog.height() → int
RotateCropDialog.heightForWidth(int) → int
RotateCropDialog.heightMM() → int
RotateCropDialog.hide()
RotateCropDialog.hideEvent(QHideEvent)
RotateCropDialog.inherits(str) → bool
RotateCropDialog.inputContext() → QInputContext
RotateCropDialog.inputMethodEvent(QInputMethodEvent)
RotateCropDialog.inputMethodHints() → Qt.InputMethodHints
RotateCropDialog.inputMethodQuery(Qt.InputMethodQuery) → QVariant
RotateCropDialog.insertAction(QAction, QAction)
RotateCropDialog.insertActions(QAction, list-of-QAction)
RotateCropDialog.installEventFilter(QObject)
RotateCropDialog.install_button_layout()

Reimplemented ImageDialog method

RotateCropDialog.isActiveWindow() → bool
RotateCropDialog.isAncestorOf(QWidget) → bool
RotateCropDialog.isEnabled() → bool
RotateCropDialog.isEnabledTo(QWidget) → bool
RotateCropDialog.isEnabledToTLW() → bool
RotateCropDialog.isFullScreen() → bool
RotateCropDialog.isHidden() → bool
RotateCropDialog.isLeftToRight() → bool
RotateCropDialog.isMaximized() → bool
RotateCropDialog.isMinimized() → bool
RotateCropDialog.isModal() → bool
RotateCropDialog.isRightToLeft() → bool
RotateCropDialog.isSizeGripEnabled() → bool
RotateCropDialog.isTopLevel() → bool
RotateCropDialog.isVisible() → bool
RotateCropDialog.isVisibleTo(QWidget) → bool
RotateCropDialog.isWidgetType() → bool
RotateCropDialog.isWindow() → bool
RotateCropDialog.isWindowModified() → bool
RotateCropDialog.keyPressEvent(QKeyEvent)
RotateCropDialog.keyReleaseEvent(QKeyEvent)
RotateCropDialog.keyboardGrabber() → QWidget
RotateCropDialog.killTimer(int)
RotateCropDialog.languageChange()
RotateCropDialog.layout() → QLayout
RotateCropDialog.layoutDirection() → Qt.LayoutDirection
RotateCropDialog.leaveEvent(QEvent)
RotateCropDialog.locale() → QLocale
RotateCropDialog.logicalDpiX() → int
RotateCropDialog.logicalDpiY() → int
RotateCropDialog.lower()
RotateCropDialog.mapFrom(QWidget, QPoint) → QPoint
RotateCropDialog.mapFromGlobal(QPoint) → QPoint
RotateCropDialog.mapFromParent(QPoint) → QPoint
RotateCropDialog.mapTo(QWidget, QPoint) → QPoint
RotateCropDialog.mapToGlobal(QPoint) → QPoint
RotateCropDialog.mapToParent(QPoint) → QPoint
RotateCropDialog.mask() → QRegion
RotateCropDialog.maximumHeight() → int
RotateCropDialog.maximumSize() → QSize
RotateCropDialog.maximumWidth() → int
RotateCropDialog.metaObject() → QMetaObject
RotateCropDialog.metric(QPaintDevice.PaintDeviceMetric) → int
RotateCropDialog.minimumHeight() → int
RotateCropDialog.minimumSize() → QSize
RotateCropDialog.minimumSizeHint() → QSize
RotateCropDialog.minimumWidth() → int
RotateCropDialog.mouseDoubleClickEvent(QMouseEvent)
RotateCropDialog.mouseGrabber() → QWidget
RotateCropDialog.mouseMoveEvent(QMouseEvent)
RotateCropDialog.mousePressEvent(QMouseEvent)
RotateCropDialog.mouseReleaseEvent(QMouseEvent)
RotateCropDialog.move(QPoint)

QWidget.move(int, int)

RotateCropDialog.moveEvent(QMoveEvent)
RotateCropDialog.moveToThread(QThread)
RotateCropDialog.nativeParentWidget() → QWidget
RotateCropDialog.nextInFocusChain() → QWidget
RotateCropDialog.normalGeometry() → QRect
RotateCropDialog.numColors() → int
RotateCropDialog.objectName() → QString
RotateCropDialog.open()
RotateCropDialog.orientation() → Qt.Orientation
RotateCropDialog.overrideWindowFlags(Qt.WindowFlags)
RotateCropDialog.overrideWindowState(Qt.WindowStates)
RotateCropDialog.paintEngine() → QPaintEngine
RotateCropDialog.paintEvent(QPaintEvent)
RotateCropDialog.paintingActive() → bool
RotateCropDialog.palette() → QPalette
RotateCropDialog.paletteChange(QPalette)
RotateCropDialog.parent() → QObject
RotateCropDialog.parentWidget() → QWidget
RotateCropDialog.physicalDpiX() → int
RotateCropDialog.physicalDpiY() → int
RotateCropDialog.pos() → QPoint
RotateCropDialog.previousInFocusChain() → QWidget
RotateCropDialog.property(str) → QVariant
RotateCropDialog.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.

RotateCropDialog.raise_()
RotateCropDialog.receivers(SIGNAL()) → int
RotateCropDialog.rect() → QRect
RotateCropDialog.register_all_curve_tools()

Register standard, curve-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()

RotateCropDialog.register_all_image_tools()

Register standard, image-related and other tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()

RotateCropDialog.register_curve_tools()

Register only curve-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()

RotateCropDialog.register_image_tools()

Register only image-related tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()

RotateCropDialog.register_other_tools()

Register other common tools

See also

methods

guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()

RotateCropDialog.register_standard_tools()

Registering basic tools for standard plot dialog –> top of the context-menu

RotateCropDialog.register_tools()

Register the plotting dialog box tools: the base implementation provides standard, image-related and other tools - i.e. calling this method is exactly the same as calling guiqwt.plot.CurveDialog.register_all_image_tools()

This method may be overriden to provide a fully customized set of tools

RotateCropDialog.reject()
RotateCropDialog.reject_changes()

Restore item original transform settings

RotateCropDialog.rejected

QDialog.rejected [signal]

RotateCropDialog.releaseKeyboard()
RotateCropDialog.releaseMouse()
RotateCropDialog.releaseShortcut(int)
RotateCropDialog.removeAction(QAction)
RotateCropDialog.removeEventFilter(QObject)
RotateCropDialog.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)

RotateCropDialog.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

RotateCropDialog.reset()

Reset crop/transform image settings

RotateCropDialog.resetInputContext()
RotateCropDialog.reset_transformation()

Reset transformation

RotateCropDialog.resize(QSize)

QWidget.resize(int, int)

RotateCropDialog.resizeEvent(QResizeEvent)
RotateCropDialog.restoreGeometry(QByteArray) → bool
RotateCropDialog.restore_original_state()

Restore item original state

RotateCropDialog.result() → int
RotateCropDialog.saveGeometry() → QByteArray
RotateCropDialog.scroll(int, int)

QWidget.scroll(int, int, QRect)

RotateCropDialog.sender() → QObject
RotateCropDialog.senderSignalIndex() → int
RotateCropDialog.setAcceptDrops(bool)
RotateCropDialog.setAccessibleDescription(QString)
RotateCropDialog.setAccessibleName(QString)
RotateCropDialog.setAttribute(Qt.WidgetAttribute, bool on=True)
RotateCropDialog.setAutoFillBackground(bool)
RotateCropDialog.setBackgroundRole(QPalette.ColorRole)
RotateCropDialog.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

RotateCropDialog.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

RotateCropDialog.setContextMenuPolicy(Qt.ContextMenuPolicy)
RotateCropDialog.setCursor(QCursor)
RotateCropDialog.setDisabled(bool)
RotateCropDialog.setEnabled(bool)
RotateCropDialog.setExtension(QWidget)
RotateCropDialog.setFixedHeight(int)
RotateCropDialog.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

RotateCropDialog.setFixedWidth(int)
RotateCropDialog.setFocus()

QWidget.setFocus(Qt.FocusReason)

RotateCropDialog.setFocusPolicy(Qt.FocusPolicy)
RotateCropDialog.setFocusProxy(QWidget)
RotateCropDialog.setFont(QFont)
RotateCropDialog.setForegroundRole(QPalette.ColorRole)
RotateCropDialog.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

RotateCropDialog.setGraphicsEffect(QGraphicsEffect)
RotateCropDialog.setHidden(bool)
RotateCropDialog.setInputContext(QInputContext)
RotateCropDialog.setInputMethodHints(Qt.InputMethodHints)
RotateCropDialog.setLayout(QLayout)
RotateCropDialog.setLayoutDirection(Qt.LayoutDirection)
RotateCropDialog.setLocale(QLocale)
RotateCropDialog.setMask(QBitmap)

QWidget.setMask(QRegion)

RotateCropDialog.setMaximumHeight(int)
RotateCropDialog.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

RotateCropDialog.setMaximumWidth(int)
RotateCropDialog.setMinimumHeight(int)
RotateCropDialog.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

RotateCropDialog.setMinimumWidth(int)
RotateCropDialog.setModal(bool)
RotateCropDialog.setMouseTracking(bool)
RotateCropDialog.setObjectName(QString)
RotateCropDialog.setOrientation(Qt.Orientation)
RotateCropDialog.setPalette(QPalette)
RotateCropDialog.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

RotateCropDialog.setProperty(str, QVariant) → bool
RotateCropDialog.setResult(int)
RotateCropDialog.setShortcutAutoRepeat(int, bool enabled=True)
RotateCropDialog.setShortcutEnabled(int, bool enabled=True)
RotateCropDialog.setShown(bool)
RotateCropDialog.setSizeGripEnabled(bool)
RotateCropDialog.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

RotateCropDialog.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

RotateCropDialog.setStatusTip(QString)
RotateCropDialog.setStyle(QStyle)
RotateCropDialog.setStyleSheet(QString)
RotateCropDialog.setTabOrder(QWidget, QWidget)
RotateCropDialog.setToolTip(QString)
RotateCropDialog.setUpdatesEnabled(bool)
RotateCropDialog.setVisible(bool)
RotateCropDialog.setWhatsThis(QString)
RotateCropDialog.setWindowFilePath(QString)
RotateCropDialog.setWindowFlags(Qt.WindowFlags)
RotateCropDialog.setWindowIcon(QIcon)
RotateCropDialog.setWindowIconText(QString)
RotateCropDialog.setWindowModality(Qt.WindowModality)
RotateCropDialog.setWindowModified(bool)
RotateCropDialog.setWindowOpacity(float)
RotateCropDialog.setWindowRole(QString)
RotateCropDialog.setWindowState(Qt.WindowStates)
RotateCropDialog.setWindowTitle(QString)
RotateCropDialog.set_active_tool(tool=None)

Set active tool (if tool argument is None, the active tool will be the default tool)

RotateCropDialog.set_contrast_range(zmin, zmax)

Convenience function to set the contrast adjustment panel range

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
RotateCropDialog.set_default_plot(plot)

Set default plot

The default plot is the plot on which tools and panels will act.

RotateCropDialog.set_default_tool(tool)

Set default tool

RotateCropDialog.set_default_toolbar(toolbar)

Set default toolbar

RotateCropDialog.set_item(item)

Set associated item – must be a TrImageItem object

RotateCropDialog.show()
RotateCropDialog.showEvent(QShowEvent)
RotateCropDialog.showExtension(bool)
RotateCropDialog.showFullScreen()
RotateCropDialog.showMaximized()
RotateCropDialog.showMinimized()
RotateCropDialog.showNormal()
RotateCropDialog.show_crop_rect(state)

Show/hide cropping rectangle shape

RotateCropDialog.signalsBlocked() → bool
RotateCropDialog.size() → QSize
RotateCropDialog.sizeHint() → QSize
RotateCropDialog.sizeIncrement() → QSize
RotateCropDialog.sizePolicy() → QSizePolicy
RotateCropDialog.stackUnder(QWidget)
RotateCropDialog.startTimer(int) → int
RotateCropDialog.statusTip() → QString
RotateCropDialog.style() → QStyle
RotateCropDialog.styleSheet() → QString
RotateCropDialog.tabletEvent(QTabletEvent)
RotateCropDialog.testAttribute(Qt.WidgetAttribute) → bool
RotateCropDialog.thread() → QThread
RotateCropDialog.timerEvent(QTimerEvent)
RotateCropDialog.toolTip() → QString
RotateCropDialog.topLevelWidget() → QWidget
RotateCropDialog.tr(str, str disambiguation=None, int n=-1) → QString
RotateCropDialog.trUtf8(str, str disambiguation=None, int n=-1) → QString
RotateCropDialog.underMouse() → bool
RotateCropDialog.ungrabGesture(Qt.GestureType)
RotateCropDialog.unsetCursor()
RotateCropDialog.unsetLayoutDirection()
RotateCropDialog.unsetLocale()
RotateCropDialog.unset_item()

Unset the associated item, freeing memory

RotateCropDialog.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

RotateCropDialog.updateGeometry()
RotateCropDialog.updateMicroFocus()
RotateCropDialog.update_cross_sections()

Convenience function to update the cross section panels at once

This is strictly equivalent to the following:

# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any 
#  class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
RotateCropDialog.update_tools_status(plot=None)

Update tools for current plot

RotateCropDialog.updatesEnabled() → bool
RotateCropDialog.visibleRegion() → QRegion
RotateCropDialog.whatsThis() → QString
RotateCropDialog.wheelEvent(QWheelEvent)
RotateCropDialog.width() → int
RotateCropDialog.widthMM() → int
RotateCropDialog.winId() → int
RotateCropDialog.window() → QWidget
RotateCropDialog.windowActivationChange(bool)
RotateCropDialog.windowFilePath() → QString
RotateCropDialog.windowFlags() → Qt.WindowFlags
RotateCropDialog.windowIcon() → QIcon
RotateCropDialog.windowIconText() → QString
RotateCropDialog.windowModality() → Qt.WindowModality
RotateCropDialog.windowOpacity() → float
RotateCropDialog.windowRole() → QString
RotateCropDialog.windowState() → Qt.WindowStates
RotateCropDialog.windowTitle() → QString
RotateCropDialog.windowType() → Qt.WindowType
RotateCropDialog.x() → int
RotateCropDialog.x11Info() → QX11Info
RotateCropDialog.x11PictureHandle() → int
RotateCropDialog.y() → int
class guiqwt.widgets.rotatecrop.RotateCropWidget(parent, options=None)[source]

Rotate & Crop Widget

Rotate and crop a guiqwt.image.TrImageItem plot item

class RenderFlags

QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()

RotateCropWidget.acceptDrops() → bool
RotateCropWidget.accept_changes()

Computed rotated/cropped array and apply changes to item

RotateCropWidget.accessibleDescription() → QString
RotateCropWidget.accessibleName() → QString
RotateCropWidget.actionEvent(QActionEvent)
RotateCropWidget.actions() → list-of-QAction
RotateCropWidget.activateWindow()
RotateCropWidget.addAction(QAction)
RotateCropWidget.addActions(list-of-QAction)
RotateCropWidget.add_apply_button(layout)

Add the standard apply button

RotateCropWidget.add_buttons_to_layout(layout)

Add tool buttons to layout

RotateCropWidget.add_reset_button(layout)

Add the standard reset button

RotateCropWidget.adjustSize()
RotateCropWidget.apply_transformation()

Apply transformation, e.g. crop or rotate

RotateCropWidget.autoFillBackground() → bool
RotateCropWidget.backgroundRole() → QPalette.ColorRole
RotateCropWidget.baseSize() → QSize
RotateCropWidget.blockSignals(bool) → bool
RotateCropWidget.changeEvent(QEvent)
RotateCropWidget.childAt(QPoint) → QWidget

QWidget.childAt(int, int) -> QWidget

RotateCropWidget.childEvent(QChildEvent)
RotateCropWidget.children() → list-of-QObject
RotateCropWidget.childrenRect() → QRect
RotateCropWidget.childrenRegion() → QRegion
RotateCropWidget.clearFocus()
RotateCropWidget.clearMask()
RotateCropWidget.close() → bool
RotateCropWidget.closeEvent(QCloseEvent)
RotateCropWidget.colorCount() → int
RotateCropWidget.compute_transformation()

Compute transformation, return compute output array

RotateCropWidget.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

RotateCropWidget.connectNotify(SIGNAL())
RotateCropWidget.contentsMargins() → QMargins
RotateCropWidget.contentsRect() → QRect
RotateCropWidget.contextMenuEvent(QContextMenuEvent)
RotateCropWidget.contextMenuPolicy() → Qt.ContextMenuPolicy
RotateCropWidget.create(int window=0, bool initializeWindow=True, bool destroyOldWindow=True)
RotateCropWidget.cursor() → QCursor
RotateCropWidget.customContextMenuRequested

QWidget.customContextMenuRequested[QPoint] [signal]

RotateCropWidget.customEvent(QEvent)
RotateCropWidget.deleteLater()
RotateCropWidget.depth() → int
RotateCropWidget.destroy(bool destroyWindow=True, bool destroySubWindows=True)
RotateCropWidget.destroyed

QObject.destroyed[QObject] [signal] QObject.destroyed [signal]

RotateCropWidget.devType() → int
RotateCropWidget.disconnect(QObject, SIGNAL(), QObject, SLOT()) → bool

QObject.disconnect(QObject, SIGNAL(), callable) -> bool

RotateCropWidget.disconnectNotify(SIGNAL())
RotateCropWidget.dragEnterEvent(QDragEnterEvent)
RotateCropWidget.dragLeaveEvent(QDragLeaveEvent)
RotateCropWidget.dragMoveEvent(QDragMoveEvent)
RotateCropWidget.dropEvent(QDropEvent)
RotateCropWidget.dumpObjectInfo()
RotateCropWidget.dumpObjectTree()
RotateCropWidget.dynamicPropertyNames() → list-of-QByteArray
RotateCropWidget.effectiveWinId() → int
RotateCropWidget.emit(SIGNAL(), ...)
RotateCropWidget.enabledChange(bool)
RotateCropWidget.ensurePolished()
RotateCropWidget.enterEvent(QEvent)
RotateCropWidget.event(QEvent) → bool
RotateCropWidget.eventFilter(QObject, QEvent) → bool
RotateCropWidget.find(int) → QWidget
RotateCropWidget.findChild(type, QString name=QString()) → QObject

QObject.findChild(tuple, QString name=QString()) -> QObject

RotateCropWidget.findChildren(type, QString name=QString()) → list-of-QObject

QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject

RotateCropWidget.focusInEvent(QFocusEvent)
RotateCropWidget.focusNextChild() → bool
RotateCropWidget.focusNextPrevChild(bool) → bool
RotateCropWidget.focusOutEvent(QFocusEvent)
RotateCropWidget.focusPolicy() → Qt.FocusPolicy
RotateCropWidget.focusPreviousChild() → bool
RotateCropWidget.focusProxy() → QWidget
RotateCropWidget.focusWidget() → QWidget
RotateCropWidget.font() → QFont
RotateCropWidget.fontChange(QFont)
RotateCropWidget.fontInfo() → QFontInfo
RotateCropWidget.fontMetrics() → QFontMetrics
RotateCropWidget.foregroundRole() → QPalette.ColorRole
RotateCropWidget.frameGeometry() → QRect
RotateCropWidget.frameSize() → QSize
RotateCropWidget.geometry() → QRect
RotateCropWidget.getContentsMargins() -> (int, int, int, int)
RotateCropWidget.get_plot()

Required for BaseTransformMixin

RotateCropWidget.grabGesture(Qt.GestureType, Qt.GestureFlags flags=Qt.GestureFlags(0))
RotateCropWidget.grabKeyboard()
RotateCropWidget.grabMouse()

QWidget.grabMouse(QCursor)

RotateCropWidget.grabShortcut(QKeySequence, Qt.ShortcutContext context=Qt.WindowShortcut) → int
RotateCropWidget.graphicsEffect() → QGraphicsEffect
RotateCropWidget.graphicsProxyWidget() → QGraphicsProxyWidget
RotateCropWidget.handle() → int
RotateCropWidget.hasFocus() → bool
RotateCropWidget.hasMouseTracking() → bool
RotateCropWidget.height() → int
RotateCropWidget.heightForWidth(int) → int
RotateCropWidget.heightMM() → int
RotateCropWidget.hide()
RotateCropWidget.hideEvent(QHideEvent)
RotateCropWidget.inherits(str) → bool
RotateCropWidget.inputContext() → QInputContext
RotateCropWidget.inputMethodEvent(QInputMethodEvent)
RotateCropWidget.inputMethodHints() → Qt.InputMethodHints
RotateCropWidget.inputMethodQuery(Qt.InputMethodQuery) → QVariant
RotateCropWidget.insertAction(QAction, QAction)
RotateCropWidget.insertActions(QAction, list-of-QAction)
RotateCropWidget.installEventFilter(QObject)
RotateCropWidget.isActiveWindow() → bool
RotateCropWidget.isAncestorOf(QWidget) → bool
RotateCropWidget.isEnabled() → bool
RotateCropWidget.isEnabledTo(QWidget) → bool
RotateCropWidget.isEnabledToTLW() → bool
RotateCropWidget.isFullScreen() → bool
RotateCropWidget.isHidden() → bool
RotateCropWidget.isLeftToRight() → bool
RotateCropWidget.isMaximized() → bool
RotateCropWidget.isMinimized() → bool
RotateCropWidget.isModal() → bool
RotateCropWidget.isRightToLeft() → bool
RotateCropWidget.isTopLevel() → bool
RotateCropWidget.isVisible() → bool
RotateCropWidget.isVisibleTo(QWidget) → bool
RotateCropWidget.isWidgetType() → bool
RotateCropWidget.isWindow() → bool
RotateCropWidget.isWindowModified() → bool
RotateCropWidget.keyPressEvent(QKeyEvent)
RotateCropWidget.keyReleaseEvent(QKeyEvent)
RotateCropWidget.keyboardGrabber() → QWidget
RotateCropWidget.killTimer(int)
RotateCropWidget.languageChange()
RotateCropWidget.layout() → QLayout
RotateCropWidget.layoutDirection() → Qt.LayoutDirection
RotateCropWidget.leaveEvent(QEvent)
RotateCropWidget.locale() → QLocale
RotateCropWidget.logicalDpiX() → int
RotateCropWidget.logicalDpiY() → int
RotateCropWidget.lower()
RotateCropWidget.mapFrom(QWidget, QPoint) → QPoint
RotateCropWidget.mapFromGlobal(QPoint) → QPoint
RotateCropWidget.mapFromParent(QPoint) → QPoint
RotateCropWidget.mapTo(QWidget, QPoint) → QPoint
RotateCropWidget.mapToGlobal(QPoint) → QPoint
RotateCropWidget.mapToParent(QPoint) → QPoint
RotateCropWidget.mask() → QRegion
RotateCropWidget.maximumHeight() → int
RotateCropWidget.maximumSize() → QSize
RotateCropWidget.maximumWidth() → int
RotateCropWidget.metaObject() → QMetaObject
RotateCropWidget.metric(QPaintDevice.PaintDeviceMetric) → int
RotateCropWidget.minimumHeight() → int
RotateCropWidget.minimumSize() → QSize
RotateCropWidget.minimumSizeHint() → QSize
RotateCropWidget.minimumWidth() → int
RotateCropWidget.mouseDoubleClickEvent(QMouseEvent)
RotateCropWidget.mouseGrabber() → QWidget
RotateCropWidget.mouseMoveEvent(QMouseEvent)
RotateCropWidget.mousePressEvent(QMouseEvent)
RotateCropWidget.mouseReleaseEvent(QMouseEvent)
RotateCropWidget.move(QPoint)

QWidget.move(int, int)

RotateCropWidget.moveEvent(QMoveEvent)
RotateCropWidget.moveToThread(QThread)
RotateCropWidget.nativeParentWidget() → QWidget
RotateCropWidget.nextInFocusChain() → QWidget
RotateCropWidget.normalGeometry() → QRect
RotateCropWidget.numColors() → int
RotateCropWidget.objectName() → QString
RotateCropWidget.overrideWindowFlags(Qt.WindowFlags)
RotateCropWidget.overrideWindowState(Qt.WindowStates)
RotateCropWidget.paintEngine() → QPaintEngine
RotateCropWidget.paintEvent(QPaintEvent)
RotateCropWidget.paintingActive() → bool
RotateCropWidget.palette() → QPalette
RotateCropWidget.paletteChange(QPalette)
RotateCropWidget.parent() → QObject
RotateCropWidget.parentWidget() → QWidget
RotateCropWidget.physicalDpiX() → int
RotateCropWidget.physicalDpiY() → int
RotateCropWidget.pos() → QPoint
RotateCropWidget.previousInFocusChain() → QWidget
RotateCropWidget.property(str) → QVariant
RotateCropWidget.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.

RotateCropWidget.raise_()
RotateCropWidget.receivers(SIGNAL()) → int
RotateCropWidget.rect() → QRect
RotateCropWidget.reject_changes()

Restore item original transform settings

RotateCropWidget.releaseKeyboard()
RotateCropWidget.releaseMouse()
RotateCropWidget.releaseShortcut(int)
RotateCropWidget.removeAction(QAction)
RotateCropWidget.removeEventFilter(QObject)
RotateCropWidget.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)

RotateCropWidget.repaint()

QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)

RotateCropWidget.reset()

Reset crop/transform image settings

RotateCropWidget.resetInputContext()
RotateCropWidget.reset_transformation()

Reset transformation

RotateCropWidget.resize(QSize)

QWidget.resize(int, int)

RotateCropWidget.resizeEvent(QResizeEvent)
RotateCropWidget.restoreGeometry(QByteArray) → bool
RotateCropWidget.restore_original_state()

Restore item original state

RotateCropWidget.saveGeometry() → QByteArray
RotateCropWidget.scroll(int, int)

QWidget.scroll(int, int, QRect)

RotateCropWidget.sender() → QObject
RotateCropWidget.senderSignalIndex() → int
RotateCropWidget.setAcceptDrops(bool)
RotateCropWidget.setAccessibleDescription(QString)
RotateCropWidget.setAccessibleName(QString)
RotateCropWidget.setAttribute(Qt.WidgetAttribute, bool on=True)
RotateCropWidget.setAutoFillBackground(bool)
RotateCropWidget.setBackgroundRole(QPalette.ColorRole)
RotateCropWidget.setBaseSize(int, int)

QWidget.setBaseSize(QSize)

RotateCropWidget.setContentsMargins(int, int, int, int)

QWidget.setContentsMargins(QMargins)

RotateCropWidget.setContextMenuPolicy(Qt.ContextMenuPolicy)
RotateCropWidget.setCursor(QCursor)
RotateCropWidget.setDisabled(bool)
RotateCropWidget.setEnabled(bool)
RotateCropWidget.setFixedHeight(int)
RotateCropWidget.setFixedSize(QSize)

QWidget.setFixedSize(int, int)

RotateCropWidget.setFixedWidth(int)
RotateCropWidget.setFocus()

QWidget.setFocus(Qt.FocusReason)

RotateCropWidget.setFocusPolicy(Qt.FocusPolicy)
RotateCropWidget.setFocusProxy(QWidget)
RotateCropWidget.setFont(QFont)
RotateCropWidget.setForegroundRole(QPalette.ColorRole)
RotateCropWidget.setGeometry(QRect)

QWidget.setGeometry(int, int, int, int)

RotateCropWidget.setGraphicsEffect(QGraphicsEffect)
RotateCropWidget.setHidden(bool)
RotateCropWidget.setInputContext(QInputContext)
RotateCropWidget.setInputMethodHints(Qt.InputMethodHints)
RotateCropWidget.setLayout(QLayout)
RotateCropWidget.setLayoutDirection(Qt.LayoutDirection)
RotateCropWidget.setLocale(QLocale)
RotateCropWidget.setMask(QBitmap)

QWidget.setMask(QRegion)

RotateCropWidget.setMaximumHeight(int)
RotateCropWidget.setMaximumSize(int, int)

QWidget.setMaximumSize(QSize)

RotateCropWidget.setMaximumWidth(int)
RotateCropWidget.setMinimumHeight(int)
RotateCropWidget.setMinimumSize(int, int)

QWidget.setMinimumSize(QSize)

RotateCropWidget.setMinimumWidth(int)
RotateCropWidget.setMouseTracking(bool)
RotateCropWidget.setObjectName(QString)
RotateCropWidget.setPalette(QPalette)
RotateCropWidget.setParent(QWidget)

QWidget.setParent(QWidget, Qt.WindowFlags)

RotateCropWidget.setProperty(str, QVariant) → bool
RotateCropWidget.setShortcutAutoRepeat(int, bool enabled=True)
RotateCropWidget.setShortcutEnabled(int, bool enabled=True)
RotateCropWidget.setShown(bool)
RotateCropWidget.setSizeIncrement(int, int)

QWidget.setSizeIncrement(QSize)

RotateCropWidget.setSizePolicy(QSizePolicy)

QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)

RotateCropWidget.setStatusTip(QString)
RotateCropWidget.setStyle(QStyle)
RotateCropWidget.setStyleSheet(QString)
RotateCropWidget.setTabOrder(QWidget, QWidget)
RotateCropWidget.setToolTip(QString)
RotateCropWidget.setUpdatesEnabled(bool)
RotateCropWidget.setVisible(bool)
RotateCropWidget.setWhatsThis(QString)
RotateCropWidget.setWindowFilePath(QString)
RotateCropWidget.setWindowFlags(Qt.WindowFlags)
RotateCropWidget.setWindowIcon(QIcon)
RotateCropWidget.setWindowIconText(QString)
RotateCropWidget.setWindowModality(Qt.WindowModality)
RotateCropWidget.setWindowModified(bool)
RotateCropWidget.setWindowOpacity(float)
RotateCropWidget.setWindowRole(QString)
RotateCropWidget.setWindowState(Qt.WindowStates)
RotateCropWidget.setWindowTitle(QString)
RotateCropWidget.set_item(item)

Set associated item – must be a TrImageItem object

RotateCropWidget.show()
RotateCropWidget.showEvent(QShowEvent)
RotateCropWidget.showFullScreen()
RotateCropWidget.showMaximized()
RotateCropWidget.showMinimized()
RotateCropWidget.showNormal()
RotateCropWidget.show_crop_rect(state)

Show/hide cropping rectangle shape

RotateCropWidget.signalsBlocked() → bool
RotateCropWidget.size() → QSize
RotateCropWidget.sizeHint() → QSize
RotateCropWidget.sizeIncrement() → QSize
RotateCropWidget.sizePolicy() → QSizePolicy
RotateCropWidget.stackUnder(QWidget)
RotateCropWidget.startTimer(int) → int
RotateCropWidget.statusTip() → QString
RotateCropWidget.style() → QStyle
RotateCropWidget.styleSheet() → QString
RotateCropWidget.tabletEvent(QTabletEvent)
RotateCropWidget.testAttribute(Qt.WidgetAttribute) → bool
RotateCropWidget.thread() → QThread
RotateCropWidget.timerEvent(QTimerEvent)
RotateCropWidget.toolTip() → QString
RotateCropWidget.topLevelWidget() → QWidget
RotateCropWidget.tr(str, str disambiguation=None, int n=-1) → QString
RotateCropWidget.trUtf8(str, str disambiguation=None, int n=-1) → QString
RotateCropWidget.underMouse() → bool
RotateCropWidget.ungrabGesture(Qt.GestureType)
RotateCropWidget.unsetCursor()
RotateCropWidget.unsetLayoutDirection()
RotateCropWidget.unsetLocale()
RotateCropWidget.unset_item()

Unset the associated item, freeing memory

RotateCropWidget.update()

QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)

RotateCropWidget.updateGeometry()
RotateCropWidget.updateMicroFocus()
RotateCropWidget.updatesEnabled() → bool
RotateCropWidget.visibleRegion() → QRegion
RotateCropWidget.whatsThis() → QString
RotateCropWidget.wheelEvent(QWheelEvent)
RotateCropWidget.width() → int
RotateCropWidget.widthMM() → int
RotateCropWidget.winId() → int
RotateCropWidget.window() → QWidget
RotateCropWidget.windowActivationChange(bool)
RotateCropWidget.windowFilePath() → QString
RotateCropWidget.windowFlags() → Qt.WindowFlags
RotateCropWidget.windowIcon() → QIcon
RotateCropWidget.windowIconText() → QString
RotateCropWidget.windowModality() → Qt.WindowModality
RotateCropWidget.windowOpacity() → float
RotateCropWidget.windowRole() → QString
RotateCropWidget.windowState() → Qt.WindowStates
RotateCropWidget.windowTitle() → QString
RotateCropWidget.windowType() → Qt.WindowType
RotateCropWidget.x() → int
RotateCropWidget.x11Info() → QX11Info
RotateCropWidget.x11PictureHandle() → int
RotateCropWidget.y() → int