Scientific.QtWidgets.QtPlotCanvas.PlotCanvas

Package Scientific :: Package QtWidgets :: Module QtPlotCanvas :: Class PlotCanvas |
[frames] | no frames]

# Class PlotCanvas

     object --+
              |
    sip.wrapper --+
                  |
              qt.Qt --+
                      |
             qt.QObject --+
                          |
         object --+       |
                  |       |
        sip.wrapper --+   |
                      |   |
        qt.QPaintDevice --+
                          |
                 qt.QWidget --+
                              |
                             PlotCanvas

Qt plot widget

PlotCanvas objects support all operations of Qt widgets.

Nested Classes
Inherited from `qt.QWidget`: `BackgroundOrigin`, `FocusPolicy` Inherited from `qt.Qt`: `AlignmentFlags`, `AnchorAttribute`, `ArrowType`, `BGMode`, `BackgroundMode`, `BrushStyle`, `ButtonState`, `Corner`, `CursorShape`, `DateFormat`, `Dock`, `GUIStyle`, `ImageConversionFlags`, `Key`, `MacintoshVersion`, `Modifier`, `Orientation`, `PenCapStyle`, `PenJoinStyle`, `PenStyle`, `RasterOp`, `SequenceMatch`, `SortOrder`, `StringComparisonMode`, `TextFlags`, `TextFormat`, `TimeSpec`, `UIEffect`, `WidgetFlags`, `WidgetState`, `WindowState`, `WindowsVersion` Inherited from `qt.QPaintDevice`: `PDevCmd`

Instance Methods
__init__(self, parent=None, background=`'``white``'`, font=None, zoom=False, select=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
clear(self) Clear the canvas |
draw(self, graphics, xaxis=None, yaxis=None) Draw something on the canvas |
mouseMoveEvent(self, event) |
mousePressEvent(self, event) |
mouseReleaseEvent(self, event) |
paintEvent(self, event) |
redraw(self) Redraw the most recent canvas contents |
resizeEvent(self, event) |
select(self, range) Highlight a range on the x-axis |
Inherited from `qt.QWidget`: `acceptDrops`, `adjustSize`, `autoMask`, `backgroundBrush`, `backgroundMode`, `backgroundOffset`, `backgroundOrigin`, `baseSize`, `caption`, `childAt`, `childEvent`, `childrenRect`, `childrenRegion`, `clearFocus`, `clearMask`, `clearWFlags`, `clearWState`, `clipRegion`, `close`, `closeEvent`, `colorGroup`, `constPolish`, `contextMenuEvent`, `create`, `cursor`, `customEvent`, `customWhatsThis`, `destroy`, `dragEnterEvent`, `dragLeaveEvent`, `dragMoveEvent`, `drawText`, `dropEvent`, `enabledChange`, `enterEvent`, `erase`, `eraseColor`, `erasePixmap`, `event`, `find`, `focusInEvent`, `focusNextPrevChild`, `focusOutEvent`, `focusPolicy`, `focusProxy`, `focusWidget`, `font`, `fontChange`, `fontInfo`, `fontMetrics`, `foregroundColor`, `frameGeometry`, `frameSize`, `geometry`, `getWFlags`, `getWState`, `grabKeyboard`, `grabMouse`, `hasFocus`, `hasMouse`, `hasMouseTracking`, `height`, `heightForWidth`, `hide`, `hideEvent`, `icon`, `iconText`, `imComposeEvent`, `imEndEvent`, `imStartEvent`, `isActiveWindow`, `isDesktop`, `isDialog`, `isEnabled`, `isEnabledTo`, `isEnabledToTLW`, `isFocusEnabled`, `isFullScreen`, `isHidden`, `isInputMethodEnabled`, `isMaximized`, `isMinimized`, `isModal`, `isPopup`, `isShown`, `isTopLevel`, `isUpdatesEnabled`, `isVisible`, `isVisibleTo`, `isVisibleToTLW`, `keyPressEvent`, `keyReleaseEvent`, `keyboardGrabber`, `layout`, `leaveEvent`, `lowerW`, `mapFrom`, `mapFromGlobal`, `mapFromParent`, `mapTo`, `mapToGlobal`, `mapToParent`, `maximumHeight`, `maximumSize`, `maximumWidth`, `metaObject`, `metric`, `microFocusHint`, `minimumHeight`, `minimumSize`, `minimumSizeHint`, `minimumWidth`, `mouseDoubleClickEvent`, `mouseGrabber`, `move`, `moveEvent`, `ownCursor`, `ownFont`, `ownPalette`, `palette`, `paletteBackgroundColor`, `paletteBackgroundPixmap`, `paletteChange`, `paletteForegroundColor`, `parentWidget`, `polish`, `pos`, `raiseW`, `rect`, `releaseKeyboard`, `releaseMouse`, `repaint`, `reparent`, `resetInputContext`, `resize`, `scroll`, `setAcceptDrops`, `setActiveWindow`, `setAutoMask`, `setBackgroundMode`, `setBackgroundOrigin`, `setBaseSize`, `setCaption`, `setCursor`, `setDisabled`, `setEnabled`, `setEraseColor`, `setErasePixmap`, `setFixedHeight`, `setFixedSize`, `setFixedWidth`, `setFocus`, `setFocusPolicy`, `setFocusProxy`, `setFont`, `setGeometry`, `setHidden`, `setIcon`, `setIconText`, `setInputMethodEnabled`, `setKeyCompression`, `setMask`, `setMaximumHeight`, `setMaximumSize`, `setMaximumWidth`, `setMicroFocusHint`, `setMinimumHeight`, `setMinimumSize`, `setMinimumWidth`, `setMouseTracking`, `setName`, `setPalette`, `setPaletteBackgroundColor`, `setPaletteBackgroundPixmap`, `setPaletteForegroundColor`, `setShown`, `setSizeIncrement`, `setSizePolicy`, `setStyle`, `setTabOrder`, `setUpdatesEnabled`, `setWFlags`, `setWState`, `setWindowOpacity`, `setWindowState`, `show`, `showEvent`, `showFullScreen`, `showMaximized`, `showMinimized`, `showNormal`, `size`, `sizeHint`, `sizeIncrement`, `sizePolicy`, `style`, `styleChange`, `tabletEvent`, `testWFlags`, `testWState`, `timerEvent`, `topLevelWidget`, `unsetCursor`, `unsetFont`, `unsetPalette`, `update`, `updateGeometry`, `updateMask`, `visibleRect`, `wheelEvent`, `width`, `winId`, `windowActivationChange`, `windowOpacity`, `windowState`, `x`, `y` Inherited from `qt.QObject`: `blockSignals`, `child`, `children`, `className`, `connect`, `deleteLater`, `disconnect`, `dumpObjectInfo`, `dumpObjectTree`, `emit`, `eventFilter`, `highPriority`, `inherits`, `insertChild`, `installEventFilter`, `isA`, `isWidgetType`, `killTimer`, `killTimers`, `name`, `objectTrees`, `parent`, `property`, `queryList`, `removeChild`, `removeEventFilter`, `sender`, `setProperty`, `signalsBlocked`, `startTimer`, `tr`, `trUtf8` Inherited from `qt.QPaintDevice`: `devType`, `isExtDev`, `paintingActive`, `resolution`, `setResolution` Inherited from `sip.wrapper`: `__delattr__`, `__getattribute__`, `__new__`, `__setattr__` Inherited from `object`: `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__str__`

Class Variables
Inherited from `qt.QWidget`: `AncestorOrigin`, `ClickFocus`, `NoFocus`, `ParentOrigin`, `StrongFocus`, `TabFocus`, `WheelFocus`, `WidgetOrigin`, `WindowOrigin` Inherited from `qt.Qt`: `ALT`, `ASCII_ACCEL`, `AlignAuto`, `AlignBottom`, `AlignCenter`, `AlignHCenter`, `AlignHorizontal_Mask`, `AlignJustify`, `AlignLeft`, `AlignRight`, `AlignTop`, `AlignVCenter`, `AlignVertical_Mask`, `AlphaDither_Mask`, `AltButton`, `AnchorHref`, `AnchorName`, `AndNotROP`, `AndROP`, `ArrowCursor`, `Ascending`, `AutoColor`, `AutoDither`, `AutoText`, `AvoidDither`, `BDiagPattern`, `BeginsWith`, `BevelJoin`, `BitmapCursor`, `BlankCursor`, `BottomLeft`, `BottomRight`, `BreakAnywhere`, `BusyCursor`, `CTRL`, `CaseSensitive`, `ClearROP`, `ColorMode_Mask`, `ColorOnly`, `Contains`, `ControlButton`, `CopyROP`, `CrossCursor`, `CrossPattern`, `CustomPattern`, `DashDotDotLine`, `DashDotLine`, `DashLine`, `Dense1Pattern`, `Dense2Pattern`, `Dense3Pattern`, `Dense4Pattern`, `Dense5Pattern`, `Dense6Pattern`, `Dense7Pattern`, `Descending`, `DiagCrossPattern`, `DiffuseAlphaDither`, `DiffuseDither`, `DitherMode_Mask`, `Dither_Mask`, `DockBottom`, `DockLeft`, `DockMinimized`, `DockRight`, `DockTop`, `DockTornOff`, `DockUnmanaged`, `DontClip`, `DontPrint`, `DotLine`, `DownArrow`, `EndsWith`, `EraseROP`, `ExactMatch`, `ExpandTabs`, `FDiagPattern`, `FixedColor`, `FixedPixmap`, `FlatCap`, `ForbiddenCursor`, `HorPattern`, `Horizontal`, `ISODate`, `IbeamCursor`, `Identical`, `KeyButtonMask`, `Key_0`, `Key_1`, `Key_2`, `Key_3`, `Key_4`, `Key_5`, `Key_6`, `Key_7`, `Key_8`, `Key_9`, `Key_A`, `Key_AE`, `Key_Aacute`, `Key_Acircumflex`, `Key_Adiaeresis`, `Key_Agrave`, `Key_Alt`, `Key_Ampersand`, `Key_Any`, `Key_Apostrophe`, `Key_Aring`, `Key_AsciiCircum`, `Key_AsciiTilde`, `Key_Asterisk`, `Key_At`, `Key_Atilde`, `Key_B`, `Key_Back`, `Key_BackSpace`, `Key_BackTab`, `Key_Backslash`, `Key_Backspace`, `Key_Backtab`, `Key_Bar`, `Key_BassBoost`, `Key_BassDown`, `Key_BassUp`, `Key_BraceLeft`, `Key_BraceRight`, `Key_BracketLeft`, `Key_BracketRight`, `Key_C`, `Key_CapsLock`, `Key_Ccedilla`, `Key_Clear`, `Key_Colon`, `Key_Comma`, `Key_Control`, `Key_D`, `Key_Delete`, `Key_Direction_L`, `Key_Direction_R`, `Key_Dollar`, `Key_Down`, `Key_E`, `Key_ETH`, `Key_Eacute`, `Key_Ecircumflex`, `Key_Ediaeresis`, `Key_Egrave`, `Key_End`, `Key_Enter`, `Key_Equal`, `Key_Escape`, `Key_Exclam`, `Key_F`, `Key_F1`, `Key_F10`, `Key_F11`, `Key_F12`, `Key_F13`, `Key_F14`, `Key_F15`, `Key_F16`, `Key_F17`, `Key_F18`, `Key_F19`, `Key_F2`, `Key_F20`, `Key_F21`, `Key_F22`, `Key_F23`, `Key_F24`, `Key_F25`, `Key_F26`, `Key_F27`, `Key_F28`, `Key_F29`, `Key_F3`, `Key_F30`, `Key_F31`, `Key_F32`, `Key_F33`, `Key_F34`, `Key_F35`, `Key_F4`, `Key_F5`, `Key_F6`, `Key_F7`, `Key_F8`, `Key_F9`, `Key_Favorites`, `Key_Forward`, `Key_G`, `Key_Greater`, `Key_H`, `Key_Help`, `Key_Home`, `Key_HomePage`, `Key_Hyper_L`, `Key_Hyper_R`, `Key_I`, `Key_Iacute`, `Key_Icircumflex`, `Key_Idiaeresis`, `Key_Igrave`, `Key_Insert`, `Key_J`, `Key_K`, `Key_L`, `Key_Launch0`, `Key_Launch1`, `Key_Launch2`, `Key_Launch3`, `Key_Launch4`, `Key_Launch5`, `Key_Launch6`, `Key_Launch7`, `Key_Launch8`, `Key_Launch9`, `Key_LaunchA`, `Key_LaunchB`, `Key_LaunchC`, `Key_LaunchD`, `Key_LaunchE`, `Key_LaunchF`, `Key_LaunchMail`, `Key_LaunchMedia`, `Key_Left`, `Key_Less`, `Key_M`, `Key_MediaLast`, `Key_MediaNext`, `Key_MediaPlay`, `Key_MediaPrev`, `Key_MediaRecord`, `Key_MediaStop`, `Key_Menu`, `Key_Meta`, `Key_Minus`, `Key_N`, `Key_Next`, `Key_Ntilde`, `Key_NumLock`, `Key_NumberSign`, `Key_O`, `Key_Oacute`, `Key_Ocircumflex`, `Key_Odiaeresis`, `Key_Ograve`, `Key_Ooblique`, `Key_OpenUrl`, `Key_Otilde`, `Key_P`, `Key_PageDown`, `Key_PageUp`, `Key_ParenLeft`, `Key_ParenRight`, `Key_Pause`, `Key_Percent`, `Key_Period`, `Key_Plus`, `Key_Print`, `Key_Prior`, `Key_Q`, `Key_Question`, `Key_QuoteDbl`, `Key_QuoteLeft`, `Key_R`, `Key_Refresh`, `Key_Return`, `Key_Right`, `Key_S`, `Key_ScrollLock`, `Key_Search`, `Key_Semicolon`, `Key_Shift`, `Key_Slash`, `Key_Space`, `Key_Standby`, `Key_Stop`, `Key_Super_L`, `Key_Super_R`, `Key_SysReq`, `Key_T`, `Key_THORN`, `Key_Tab`, `Key_TrebleDown`, `Key_TrebleUp`, `Key_U`, `Key_Uacute`, `Key_Ucircumflex`, `Key_Udiaeresis`, `Key_Ugrave`, `Key_Underscore`, `Key_Up`, `Key_V`, `Key_VolumeDown`, `Key_VolumeMute`, `Key_VolumeUp`, `Key_W`, `Key_X`, `Key_Y`, `Key_Yacute`, `Key_Z`, `Key_aacute`, `Key_acircumflex`, `Key_acute`, `Key_adiaeresis`, `Key_ae`, `Key_agrave`, `Key_aring`, `Key_atilde`, `Key_brokenbar`, `Key_ccedilla`, `Key_cedilla`, `Key_cent`, `Key_copyright`, `Key_currency`, `Key_degree`, `Key_diaeresis`, `Key_division`, `Key_eacute`, `Key_ecircumflex`, `Key_ediaeresis`, `Key_egrave`, `Key_eth`, `Key_exclamdown`, `Key_guillemotleft`, `Key_guillemotright`, `Key_hyphen`, `Key_iacute`, `Key_icircumflex`, `Key_idiaeresis`, `Key_igrave`, `Key_macron`, `Key_masculine`, `Key_mu`, `Key_multiply`, `Key_nobreakspace`, `Key_notsign`, `Key_ntilde`, `Key_oacute`, `Key_ocircumflex`, `Key_odiaeresis`, `Key_ograve`, `Key_onehalf`, `Key_onequarter`, `Key_onesuperior`, `Key_ordfeminine`, `Key_oslash`, `Key_otilde`, `Key_paragraph`, `Key_periodcentered`, `Key_plusminus`, `Key_questiondown`, `Key_registered`, `Key_section`, `Key_ssharp`, `Key_sterling`, `Key_thorn`, `Key_threequarters`, `Key_threesuperior`, `Key_twosuperior`, `Key_uacute`, `Key_ucircumflex`, `Key_udiaeresis`, `Key_ugrave`, `Key_unknown`, `Key_yacute`, `Key_ydiaeresis`, `Key_yen`, `Keypad`, `LastCursor`, `LastROP`, `LeftArrow`, `LeftButton`, `LocalDate`, `LocalTime`, `LogText`, `META`, `MODIFIER_MASK`, `MPenCapStyle`, `MPenJoinStyle`, `MPenStyle`, `MV_10_DOT_0`, `MV_10_DOT_1`, `MV_10_DOT_2`, `MV_10_DOT_3`, `MV_10_DOT_4`, `MV_9`, `MV_CHEETAH`, `MV_JAGUAR`, `MV_PANTHER`, `MV_PUMA`, `MV_TIGER`, `MV_Unknown`, `MetaButton`, `MidButton`, `MiterJoin`, `MonoOnly`, `MotifStyle`, `MouseButtonMask`, `NandROP`, `NoAccel`, `NoBackground`, `NoBrush`, `NoButton`, `NoMatch`, `NoPen`, `NopROP`, `NorROP`, `NotAndROP`, `NotCopyROP`, `NotEraseROP`, `NotOrROP`, `NotROP`, `NotXorROP`, `OpaqueMode`, `OrNotROP`, `OrROP`, `OrderedAlphaDither`, `OrderedDither`, `PaletteBackground`, `PaletteBase`, `PaletteBrightText`, `PaletteButton`, `PaletteButtonText`, `PaletteDark`, `PaletteForeground`, `PaletteHighlight`, `PaletteHighlightedText`, `PaletteLight`, `PaletteLink`, `PaletteLinkVisited`, `PaletteMid`, `PaletteMidlight`, `PaletteShadow`, `PaletteText`, `PartialMatch`, `PlainText`, `PointingHandCursor`, `PreferDither`, `RichText`, `RightArrow`, `RightButton`, `RoundCap`, `RoundJoin`, `SHIFT`, `SetROP`, `ShiftButton`, `ShowPrefix`, `SingleLine`, `SizeAllCursor`, `SizeBDiagCursor`, `SizeFDiagCursor`, `SizeHorCursor`, `SizeVerCursor`, `SolidLine`, `SolidPattern`, `SplitHCursor`, `SplitVCursor`, `SquareCap`, `TextDate`, `ThresholdAlphaDither`, `ThresholdDither`, `TopLeft`, `TopRight`, `TransparentMode`, `UI_AnimateCombo`, `UI_AnimateMenu`, `UI_AnimateToolBox`, `UI_AnimateTooltip`, `UI_FadeMenu`, `UI_FadeTooltip`, `UI_General`, `UNICODE_ACCEL`, `UTC`, `UpArrow`, `UpArrowCursor`, `VerPattern`, `Vertical`, `WDestructiveClose`, `WGroupLeader`, `WMouseNoMask`, `WNoAutoErase`, `WNoMousePropagation`, `WPaintClever`, `WPaintDesktop`, `WPaintUnclipped`, `WRepaintNoErase`, `WResizeNoErase`, `WShowModal`, `WState_Polished`, `WStaticContents`, `WStyle_ContextHelp`, `WStyle_Customize`, `WStyle_DialogBorder`, `WStyle_Mask`, `WStyle_Maximize`, `WStyle_MinMax`, `WStyle_Minimize`, `WStyle_NoBorder`, `WStyle_NormalBorder`, `WStyle_Reserved`, `WStyle_Splash`, `WStyle_StaysOnTop`, `WStyle_SysMenu`, `WStyle_Title`, `WStyle_Tool`, `WSubWindow`, `WType_Desktop`, `WType_Dialog`, `WType_Mask`, `WType_Popup`, `WType_TopLevel`, `WV_2000`, `WV_2003`, `WV_32s`, `WV_95`, `WV_98`, `WV_CE`, `WV_CENET`, `WV_CE_based`, `WV_DOS_based`, `WV_Me`, `WV_NT`, `WV_NT_based`, `WV_VISTA`, `WV_XP`, `WWinOwnDC`, `WX11BypassWM`, `WaitCursor`, `WhatsThisCursor`, `WindowActive`, `WindowFullScreen`, `WindowMaximized`, `WindowMinimized`, `WindowNoState`, `WindowsStyle`, `WordBreak`, `X11ParentRelative`, `XorROP`, `arrowCursor`, `black`, `blankCursor`, `blue`, `busyCursor`, `color0`, `color1`, `crossCursor`, `cyan`, `darkBlue`, `darkCyan`, `darkGray`, `darkGreen`, `darkMagenta`, `darkRed`, `darkYellow`, `forbiddenCursor`, `gray`, `green`, `ibeamCursor`, `lightGray`, `magenta`, `pointingHandCursor`, `red`, `sizeAllCursor`, `sizeBDiagCursor`, `sizeFDiagCursor`, `sizeHorCursor`, `sizeVerCursor`, `splitHCursor`, `splitVCursor`, `upArrowCursor`, `waitCursor`, `whatsThisCursor`, `white`, `yellow` Inherited from `qt.QPaintDevice`: `PdcBegin`, `PdcDrawArc`, `PdcDrawChord`, `PdcDrawCubicBezier`, `PdcDrawEllipse`, `PdcDrawFirst`, `PdcDrawImage`, `PdcDrawLast`, `PdcDrawLine`, `PdcDrawLineSegments`, `PdcDrawPie`, `PdcDrawPixmap`, `PdcDrawPoint`, `PdcDrawPolygon`, `PdcDrawPolyline`, `PdcDrawRect`, `PdcDrawRoundRect`, `PdcDrawText`, `PdcDrawText2`, `PdcDrawText2Formatted`, `PdcDrawTextFormatted`, `PdcDrawTextItem`, `PdcEnd`, `PdcLineTo`, `PdcMoveTo`, `PdcNOP`, `PdcReservedStart`, `PdcReservedStop`, `PdcRestore`, `PdcRestoreWMatrix`, `PdcSave`, `PdcSaveWMatrix`, `PdcSetBkColor`, `PdcSetBkMode`, `PdcSetBrush`, `PdcSetBrushOrigin`, `PdcSetClip`, `PdcSetClipRegion`, `PdcSetFont`, `PdcSetPen`, `PdcSetROP`, `PdcSetTabArray`, `PdcSetTabStops`, `PdcSetUnit`, `PdcSetVXform`, `PdcSetViewport`, `PdcSetWMatrix`, `PdcSetWXform`, `PdcSetWindow`, `PdcSetdev`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, parent=None, background=`'``white``'`, font=None, zoom=False, select=None) (Constructor) |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Parameters: `parent` - the parent widget `background` (`str`) - the background color `font` (QFont) - the font for axis labels, default: 10 point Helevetica `zoom` (`bool`) - a flag that indicates whether interactive zooming (using the left mouse button) is enabled; the default is `False` (no zoom) `select` - enables the user to select a range along the x axis by dragging the mouse (with the left button pressed) in the area under the x axis. If select is 0, no selection is possible. Otherwise the value of select must be a callable object that is called whenever the selection changes, with a single argument that can be `None` (no selection) or a tuple containing two x values. Overrides: object.__init__

### draw(self, graphics, xaxis=None, yaxis=None) |
Draw something on the canvas Parameters: `graphics` - the graphics object (PolyLine, PolyMarker, or PlotGraphics) to be drawn `xaxis` - `None` (no x-axis), `"automatic"` (automatic scaling), or a pair (x1, x2) defining the range of the x-axis `yaxis` - `None` (no y-axis), `"automatic"` (automatic scaling), or a pair (y1, y2) defining the range of the y-axis

### mouseMoveEvent(self, event) |
Overrides: qt.QWidget.mouseMoveEvent

### mousePressEvent(self, event) |
Overrides: qt.QWidget.mousePressEvent

### mouseReleaseEvent(self, event) |
Overrides: qt.QWidget.mouseReleaseEvent

### paintEvent(self, event) |
Overrides: qt.QWidget.paintEvent

### resizeEvent(self, event) |
Overrides: qt.QWidget.resizeEvent

### select(self, range) |
Highlight a range on the x-axis Parameters: `range` - the range on the x-axis to be highlighted. It can be `None` (no selection) or a sequence of two values on the x-axis.