schrodinger.ui.qt.smatplotlib module¶
Contains Schrodinger helper widgets for matplotlib display in PyQt
-
class
schrodinger.ui.qt.smatplotlib.
SmatplotlibToolbar
(canvas, parent, coordinates=True, allow_log=True, allow_linear=True, clipboard=True)[source]¶ Bases:
schrodinger.ui.qt.navtoolbar.NavToolbar
Kept for backward compatibility - use navtoolbar.NavToolbar instead
- Deprecated
use schrodinger.ui.qt.navtoolbar.NavToolbar instead
-
DrawChildren
= 2¶
-
DrawWindowBackground
= 1¶
-
IgnoreMask
= 4¶
-
class
PaintDeviceMetric
¶ Bases:
int
-
PdmDepth
= 6¶
-
PdmDevicePixelRatio
= 11¶
-
PdmDevicePixelRatioScaled
= 12¶
-
PdmDpiX
= 7¶
-
PdmDpiY
= 8¶
-
PdmHeight
= 2¶
-
PdmHeightMM
= 4¶
-
PdmNumColors
= 5¶
-
PdmPhysicalDpiX
= 9¶
-
PdmPhysicalDpiY
= 10¶
-
PdmWidth
= 1¶
-
PdmWidthMM
= 3¶
-
class
RenderFlag
¶ Bases:
int
-
class
RenderFlags
¶ Bases:
sip.simplewrapper
QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
__init__
(canvas, parent, coordinates=True, allow_log=True, allow_linear=True, clipboard=True)¶ Create the toolbar
- Parameters
canvas (
schrodinger.mpl_backend_agg.FigureCanvasQTAgg
) – The matplotlib canvasparent (
QtWidgets.QWidget
) – The Qt parent widgetcoordinates (bool) – Whether the cursor coordinates should be shown on the right side of the toolbar
allow_log (bool) – Whether log axes should be selectable in the Figure Option dialog
allow_linear (bool) – Whether linear axes should be selectable in the Figure Option dialog
clipboard (bool) – Whether a copy to clipboard button should be included
-
acceptDrops
(self) → bool¶
-
accessibleDescription
(self) → str¶
-
accessibleName
(self) → str¶
-
actionAt
(self, QPoint) → QAction¶ actionAt(self, int, int) -> QAction
-
actionEvent
(self, QActionEvent)¶
-
actionGeometry
(self, QAction) → QRect¶
-
actionTriggered
¶ actionTriggered(self, QAction) [signal]
-
actions
(self) → List[QAction]¶
-
activateWindow
(self)¶
-
addAction
(self, QAction)¶ addAction(self, str) -> QAction addAction(self, QIcon, str) -> QAction addAction(self, str, PYQT_SLOT) -> QAction addAction(self, QIcon, str, PYQT_SLOT) -> QAction
-
addActions
(self, Iterable[QAction])¶
-
addSeparator
(self) → QAction¶
-
addWidget
(self, QWidget) → QAction¶
-
adjustSize
(self)¶
-
adjustWindowClosing
()¶
-
allowedAreas
(self) → Qt.ToolBarAreas¶
-
allowedAreasChanged
¶ allowedAreasChanged(self, Union[Qt.ToolBarAreas, Qt.ToolBarArea]) [signal]
-
autoFillBackground
(self) → bool¶
-
back
(*args)¶ move back up the view lim stack
-
backgroundRole
(self) → QPalette.ColorRole¶
-
baseSize
(self) → QSize¶
-
blockSignals
(self, bool) → bool¶
-
changeEvent
(self, QEvent)¶
-
childAt
(self, QPoint) → QWidget¶ childAt(self, int, int) -> QWidget
-
childEvent
(self, QChildEvent)¶
-
children
(self) → List[QObject]¶
-
childrenRect
(self) → QRect¶
-
childrenRegion
(self) → QRegion¶
-
clear
(self)¶
-
clearFocus
(self)¶
-
clearMask
(self)¶
-
close
(self) → bool¶
-
closeEvent
(self, QCloseEvent)¶
-
colorCount
(self) → int¶
-
configure_subplots
()¶ Fixes a bug in the NavigationToolbar2QTAgg that causes the Reset button to reset to the wrong “original” plot if it is first modified by the configure subplots button. EV 98504.
-
connectNotify
(self, QMetaMethod)¶
-
contentsMargins
(self) → QMargins¶
-
contentsRect
(self) → QRect¶
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
contextMenuPolicy
(self) → Qt.ContextMenuPolicy¶
-
copyImageToClipboard
()¶ Copy an image of the plot to the clipboard
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
createWindowContainer
(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget¶
-
cursor
(self) → QCursor¶
-
customContextMenuRequested
¶ customContextMenuRequested(self, QPoint) [signal]
-
customEvent
(self, QEvent)¶
-
deleteLater
(self)¶
-
depth
(self) → int¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
destroyed
¶ destroyed(self, object: QObject = None) [signal]
-
devType
(self) → int¶
-
devicePixelRatio
(self) → int¶
-
devicePixelRatioF
(self) → float¶
-
devicePixelRatioFScale
() → float¶
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
drag_pan
(event)¶ Callback for dragging in pan/zoom mode.
-
drag_zoom
(event)¶ Callback for dragging in zoom mode.
-
draw
()¶ Redraw the canvases, update the locators.
-
draw_rubberband
(event, x0, y0, x1, y1)¶ Draw a rectangle rubberband to indicate zoom limits.
Note that it is not guaranteed that
x0 <= x1
andy0 <= y1
.
-
dropEvent
(self, QDropEvent)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → List[QByteArray]¶
-
dynamic_update
()¶ Deprecated since version 2.1: The dynamic_update function was deprecated in version 2.1. Use canvas.draw_idle instead.
-
edit_parameters
()¶ Open up the Customize plot dialog.
Fixes a bug in the matplotlib implementation (EV: 120930) for figures with multiple subplots without titles.
-
effectiveWinId
(self) → sip.voidptr¶
-
ensurePolished
(self)¶
-
enterEvent
(self, QEvent)¶
-
event
(self, QEvent) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
find
(sip.voidptr) → QWidget¶
-
findChild
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject¶ findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
-
findChildren
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]¶ findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPolicy
(self) → Qt.FocusPolicy¶
-
focusPreviousChild
(self) → bool¶
-
focusProxy
(self) → QWidget¶
-
focusWidget
(self) → QWidget¶
-
font
(self) → QFont¶
-
fontInfo
(self) → QFontInfo¶
-
fontMetrics
(self) → QFontMetrics¶
-
foregroundRole
(self) → QPalette.ColorRole¶
-
forward
(*args)¶ Move forward in the view lim stack.
-
frameGeometry
(self) → QRect¶
-
frameSize
(self) → QSize¶
-
geometry
(self) → QRect¶
-
getContentsMargins
(self) → Tuple[int, int, int, int]¶
-
getSubplotDialog
()¶ Return an instance of the widget to use inside the “Subplot Configuration Tool” dialog.
-
grab
(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) → QPixmap¶
-
grabGesture
(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())¶
-
grabKeyboard
(self)¶
-
grabMouse
(self)¶ grabMouse(self, Union[QCursor, Qt.CursorShape])
-
grabShortcut
(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int¶
-
graphicsEffect
(self) → QGraphicsEffect¶
-
graphicsProxyWidget
(self) → QGraphicsProxyWidget¶
-
hasFocus
(self) → bool¶
-
hasHeightForWidth
(self) → bool¶
-
hasMouseTracking
(self) → bool¶
-
hasTabletTracking
(self) → bool¶
-
height
(self) → int¶
-
heightForWidth
(self, int) → int¶
-
heightMM
(self) → int¶
-
hide
(self)¶
-
hideEvent
(self, QHideEvent)¶
-
home
(*args)¶ Restore the original view.
-
iconSize
(self) → QSize¶
-
iconSizeChanged
¶ iconSizeChanged(self, QSize) [signal]
-
inherits
(self, str) → bool¶
-
initPainter
(self, QPainter)¶
-
initStyleOption
(self, QStyleOptionToolBar)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
inputMethodHints
(self) → Qt.InputMethodHints¶
-
inputMethodQuery
(self, Qt.InputMethodQuery) → Any¶
-
SmatplotlibToolbar.insertAction(self, QAction, QAction)
-
insertActions
(self, QAction, Iterable[QAction])¶
-
insertSeparator
(self, QAction) → QAction¶
-
insertWidget
(self, QAction, QWidget) → QAction¶
-
installEventFilter
(self, QObject)¶
-
isActiveWindow
(self) → bool¶
-
isAncestorOf
(self, QWidget) → bool¶
-
isAreaAllowed
(self, Qt.ToolBarArea) → bool¶
-
isEnabled
(self) → bool¶
-
isEnabledTo
(self, QWidget) → bool¶
-
isFloatable
(self) → bool¶
-
isFloating
(self) → bool¶
-
isFullScreen
(self) → bool¶
-
isHidden
(self) → bool¶
-
isLeftToRight
(self) → bool¶
-
isMaximized
(self) → bool¶
-
isMinimized
(self) → bool¶
-
isModal
(self) → bool¶
-
isMovable
(self) → bool¶
-
isRightToLeft
(self) → bool¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isVisible
(self) → bool¶
-
isVisibleTo
(self, QWidget) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindow
(self) → bool¶
-
isWindowModified
(self) → bool¶
-
isWindowType
(self) → bool¶
-
keyPressEvent
(self, QKeyEvent)¶
-
keyReleaseEvent
(self, QKeyEvent)¶
-
keyboardGrabber
() → QWidget¶
-
killTimer
(self, int)¶
-
layout
(self) → QLayout¶
-
layoutDirection
(self) → Qt.LayoutDirection¶
-
leaveEvent
(self, QEvent)¶
-
locale
(self) → QLocale¶
-
logicalDpiX
(self) → int¶
-
logicalDpiY
(self) → int¶
-
lower
(self)¶
-
mapFrom
(self, QWidget, QPoint) → QPoint¶
-
mapFromGlobal
(self, QPoint) → QPoint¶
-
mapFromParent
(self, QPoint) → QPoint¶
-
mapTo
(self, QWidget, QPoint) → QPoint¶
-
mapToGlobal
(self, QPoint) → QPoint¶
-
mapToParent
(self, QPoint) → QPoint¶
-
mask
(self) → QRegion¶
-
maximumHeight
(self) → int¶
-
maximumSize
(self) → QSize¶
-
maximumWidth
(self) → int¶
-
message
¶
-
metaObject
(self) → QMetaObject¶
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
minimumHeight
(self) → int¶
-
minimumSize
(self) → QSize¶
-
minimumSizeHint
(self) → QSize¶
-
minimumWidth
(self) → int¶
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseGrabber
() → QWidget¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
mousePressEvent
(self, QMouseEvent)¶
-
mouseReleaseEvent
(self, QMouseEvent)¶
-
mouse_move
(event)¶
-
movableChanged
¶ movableChanged(self, bool) [signal]
-
move
(self, QPoint)¶ move(self, int, int)
-
moveEvent
(self, QMoveEvent)¶
-
moveToThread
(self, QThread)¶
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
nativeParentWidget
(self) → QWidget¶
-
nextInFocusChain
(self) → QWidget¶
-
normalGeometry
(self) → QRect¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
orientation
(self) → Qt.Orientation¶
-
orientationChanged
¶ orientationChanged(self, Qt.Orientation) [signal]
-
overrideWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
overrideWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
paintEngine
(self) → QPaintEngine¶
-
paintEvent
(self, QPaintEvent)¶
-
paintingActive
(self) → bool¶
-
palette
(self) → QPalette¶
-
pan
(*args)¶ Activate the pan/zoom tool. pan with left button, zoom with right
-
parent
(self) → QObject¶
-
parentWidget
(self) → QWidget¶
-
physicalDpiX
(self) → int¶
-
physicalDpiY
(self) → int¶
-
pos
(self) → QPoint¶
-
press
(event)¶ Called whenever a mouse button is pressed.
-
press_pan
(event)¶ Callback for mouse button press in pan/zoom mode.
-
press_zoom
(event)¶ Callback for mouse button press in zoom to rect mode.
-
previousInFocusChain
(self) → QWidget¶
-
property
(self, str) → Any¶
-
push_current
()¶ Push the current view limits and position onto their respective stacks
-
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.
-
raise_
(self)¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
rect
(self) → QRect¶
-
release
(event)¶ Callback for mouse button release.
-
releaseKeyboard
(self)¶
-
releaseMouse
(self)¶
-
releaseShortcut
(self, int)¶
-
release_pan
(event)¶ Callback for mouse button release in pan/zoom mode.
-
release_zoom
(event)¶ Callback for mouse button release in zoom to rect mode.
-
removeAction
(self, QAction)¶
-
removeEventFilter
(self, QObject)¶
-
remove_rubberband
()¶ Remove the rubberband.
-
render
(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))¶ render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
-
repaint
(self)¶ repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)
-
resize
(self, QSize)¶ resize(self, int, int)
-
resizeEvent
(self, QResizeEvent)¶
-
restoreGeometry
(self, Union[QByteArray, bytes, bytearray]) → bool¶
-
saveGeometry
(self) → QByteArray¶
-
save_figure
(*args)¶ Save the current figure.
-
SmatplotlibToolbar.scroll(self, int, int)
scroll(self, int, int, QRect)
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setAcceptDrops
(self, bool)¶
-
setAccessibleDescription
(self, str)¶
-
setAccessibleName
(self, str)¶
-
setAllowedAreas
(self, Union[Qt.ToolBarAreas, Qt.ToolBarArea])¶
-
setAttribute
(self, Qt.WidgetAttribute, on: bool = True)¶
-
setAutoFillBackground
(self, bool)¶
-
setBackgroundRole
(self, QPalette.ColorRole)¶
-
SmatplotlibToolbar.setBaseSize(self, int, int)
setBaseSize(self, QSize)
-
SmatplotlibToolbar.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins)
-
setContextMenuPolicy
(self, Qt.ContextMenuPolicy)¶
-
setCursor
(self, Union[QCursor, Qt.CursorShape])¶
-
setDisabled
(self, bool)¶
-
setEnabled
(self, bool)¶
-
setFixedHeight
(self, int)¶
-
setFixedSize
(self, QSize)¶ setFixedSize(self, int, int)
-
setFixedWidth
(self, int)¶
-
setFloatable
(self, bool)¶
-
setFocus
(self)¶ setFocus(self, Qt.FocusReason)
-
setFocusPolicy
(self, Qt.FocusPolicy)¶
-
setFocusProxy
(self, QWidget)¶
-
setFont
(self, QFont)¶
-
setForegroundRole
(self, QPalette.ColorRole)¶
-
setGeometry
(self, QRect)¶ setGeometry(self, int, int, int, int)
-
setGraphicsEffect
(self, QGraphicsEffect)¶
-
setHidden
(self, bool)¶
-
setIconSize
(self, QSize)¶
-
setInputMethodHints
(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])¶
-
setLayout
(self, QLayout)¶
-
setLayoutDirection
(self, Qt.LayoutDirection)¶
-
setLocale
(self, QLocale)¶
-
setMask
(self, QBitmap)¶ setMask(self, QRegion)
-
setMaximumHeight
(self, int)¶
-
SmatplotlibToolbar.setMaximumSize(self, int, int)
setMaximumSize(self, QSize)
-
setMaximumWidth
(self, int)¶
-
setMinimumHeight
(self, int)¶
-
SmatplotlibToolbar.setMinimumSize(self, int, int)
setMinimumSize(self, QSize)
-
setMinimumWidth
(self, int)¶
-
setMouseTracking
(self, bool)¶
-
setMovable
(self, bool)¶
-
setObjectName
(self, str)¶
-
setOrientation
(self, Qt.Orientation)¶
-
setPalette
(self, QPalette)¶
-
setParent
(self, QWidget)¶ setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
-
setProperty
(self, str, Any) → bool¶
-
setShortcutAutoRepeat
(self, int, enabled: bool = True)¶
-
setShortcutEnabled
(self, int, enabled: bool = True)¶
-
SmatplotlibToolbar.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize)
-
setSizePolicy
(self, QSizePolicy)¶ setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
-
setStatusTip
(self, str)¶
-
setStyle
(self, QStyle)¶
-
setStyleSheet
(self, str)¶
-
SmatplotlibToolbar.setTabOrder(QWidget, QWidget)
-
setTabletTracking
(self, bool)¶
-
setToolButtonStyle
(self, Qt.ToolButtonStyle)¶
-
setToolTip
(self, str)¶
-
setToolTipDuration
(self, int)¶
-
setUpdatesEnabled
(self, bool)¶
-
setVisible
(self, bool)¶
-
setWhatsThis
(self, str)¶
-
setWindowFilePath
(self, str)¶
-
setWindowFlag
(self, Qt.WindowType, on: bool = True)¶
-
setWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
setWindowIcon
(self, QIcon)¶
-
setWindowIconText
(self, str)¶
-
setWindowModality
(self, Qt.WindowModality)¶
-
setWindowModified
(self, bool)¶
-
setWindowOpacity
(self, float)¶
-
setWindowRole
(self, str)¶
-
setWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
setWindowTitle
(self, str)¶
-
set_cursor
(cursor)¶ Set the current cursor to one of the
Cursors
enums values.If required by the backend, this method should trigger an update in the backend event loop after the cursor is set, as this method may be called e.g. before a long-running task during which the GUI is not updated.
Enable or disable the back/forward button.
-
set_message
(message)¶ Sets the message in the toolbar, only puts a return in it if it would require the toolbar to expand horizontally to contain it.
-
show
(self)¶
-
showAdjustWindow
()¶ Open the subplot configuration dialog, in a non-modal way; so that the user can interact with the main plot window while it is open. Only one instance of the dialog is allowed by this code.
-
showEvent
(self, QShowEvent)¶
-
showFullScreen
(self)¶
-
showMaximized
(self)¶
-
showMinimized
(self)¶
-
showNormal
(self)¶
-
signalsBlocked
(self) → bool¶
-
size
(self) → QSize¶
-
sizeHint
()¶ Make sure that the message label is included in the sizehint calculation for height
-
sizeIncrement
(self) → QSize¶
-
sizePolicy
(self) → QSizePolicy¶
-
stackUnder
(self, QWidget)¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
statusTip
(self) → str¶
-
style
(self) → QStyle¶
-
styleSheet
(self) → str¶
-
tabletEvent
(self, QTabletEvent)¶
-
testAttribute
(self, Qt.WidgetAttribute) → bool¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
toggleViewAction
(self) → QAction¶
-
toolButtonStyle
(self) → Qt.ToolButtonStyle¶
-
toolButtonStyleChanged
¶ toolButtonStyleChanged(self, Qt.ToolButtonStyle) [signal]
-
toolTip
(self) → str¶
-
toolTipDuration
(self) → int¶
-
toolitems
= (('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous view', 'back', 'back'), ('Forward', 'Forward to next view', 'forward', 'forward'), (None, None, None, None), ('Pan', 'Pan axes with left mouse, zoom with right', 'move', 'pan'), ('Zoom', 'Zoom to rectangle', 'zoom_to_rect', 'zoom'), ('Subplots', 'Configure subplots', 'subplots', 'configure_subplots'), (None, None, None, None), ('Save', 'Save the figure', 'filesave', 'save_figure'))¶
-
topLevelChanged
¶ topLevelChanged(self, bool) [signal]
-
tr
(self, str, disambiguation: str = None, n: int = - 1) → str¶
-
underMouse
(self) → bool¶
-
ungrabGesture
(self, Qt.GestureType)¶
-
unsetCursor
(self)¶
-
unsetLayoutDirection
(self)¶
-
unsetLocale
(self)¶
-
update
()¶ Reset the axes stack
-
updateGeometry
(self)¶
-
updateMicroFocus
(self)¶
-
updatesEnabled
(self) → bool¶
-
visibilityChanged
¶ visibilityChanged(self, bool) [signal]
-
visibleRegion
(self) → QRegion¶
-
whatsThis
(self) → str¶
-
wheelEvent
(self, QWheelEvent)¶
-
widgetForAction
(self, QAction) → QWidget¶
-
width
(self) → int¶
-
widthMM
(self) → int¶
-
winId
(self) → sip.voidptr¶
-
window
(self) → QWidget¶
-
windowFilePath
(self) → str¶
-
windowFlags
(self) → Qt.WindowFlags¶
-
windowHandle
(self) → QWindow¶
-
windowIcon
(self) → QIcon¶
-
windowIconChanged
¶ windowIconChanged(self, QIcon) [signal]
-
windowIconText
(self) → str¶
-
windowIconTextChanged
¶ windowIconTextChanged(self, str) [signal]
-
windowModality
(self) → Qt.WindowModality¶
-
windowOpacity
(self) → float¶
-
windowRole
(self) → str¶
-
windowState
(self) → Qt.WindowStates¶
-
windowTitle
(self) → str¶
-
windowTitleChanged
¶ windowTitleChanged(self, str) [signal]
-
windowType
(self) → Qt.WindowType¶
-
x
(self) → int¶
-
y
(self) → int¶
-
zoom
(*args)¶ Activate zoom to rect mode.
-
class
schrodinger.ui.qt.smatplotlib.
SmatplotlibCanvas
(width=5, height=4, dpi=100, toolbar=True, layout=None, expanding=True, **kwargs)[source]¶ Bases:
matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg
- Custom subclass of FigureCanvasQTAgg that does the following:
- Allows for simultaneous definition of the Canvas, Figure and toolbar
objects, and placing them in a layout
Fixes known bugs with the mouse events detecting modifier keys
-
__init__
(width=5, height=4, dpi=100, toolbar=True, layout=None, expanding=True, **kwargs)[source]¶ - Parameters
width (number) – width of the plot Figure in inches
height (number) – height of the plot Figure in inches
dpi (int) – resolution of the plot
toolbar (boolean) – True if the toolbar should be created, but the parent parameter must be supplied in this case
layout (QLayout object) – If layout is supplied, the toolbar and canvas will be placed in it.
Extra keyword arguments are passed to the toolbar function
-
eventFilter
(obj, event)[source]¶ The canvas needs to grab keyboard input in order to reliably tell when a modifier key (shift or control) is down when a mouse button is pressed/released.
Some environments have trouble with passing the control key in events - a control-left-click is often mapped to a right-click. Therefore we do our best to capture on our own when the control key is down. Note that even this breaks for multiple control-clicks on Linux running under VMWare Fusion on Macs, because VMWare by default “lifts” the control key after the first click.
- Parameters
obj (not used) – not used
event (QEvent) – the event object
-
mousePressEvent
(event)[source]¶ Add in the control modifier key to the button_press_event
- Parameters
event (QMouseEvent) – the QMouseEvent that triggered this handler
self._key is matplotlib’s way of storing the modifier keys
-
mouseReleaseEvent
(event)[source]¶ Add in the control modifier key to the button_release_event
- Parameters
event (QMouseEvent) – the QMouseEvent that triggered this handler
self._key is matplotlib’s way of storing the modifier keys
-
DrawChildren
= 2¶
-
DrawWindowBackground
= 1¶
-
IgnoreMask
= 4¶
-
class
PaintDeviceMetric
¶ Bases:
int
-
PdmDepth
= 6¶
-
PdmDevicePixelRatio
= 11¶
-
PdmDevicePixelRatioScaled
= 12¶
-
PdmDpiX
= 7¶
-
PdmDpiY
= 8¶
-
PdmHeight
= 2¶
-
PdmHeightMM
= 4¶
-
PdmNumColors
= 5¶
-
PdmPhysicalDpiX
= 9¶
-
PdmPhysicalDpiY
= 10¶
-
PdmWidth
= 1¶
-
PdmWidthMM
= 3¶
-
class
RenderFlag
¶ Bases:
int
-
class
RenderFlags
¶ Bases:
sip.simplewrapper
QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
acceptDrops
(self) → bool¶
-
accessibleDescription
(self) → str¶
-
accessibleName
(self) → str¶
-
actionEvent
(self, QActionEvent)¶
-
actions
(self) → List[QAction]¶
-
activateWindow
(self)¶
-
addAction
(self, QAction)¶
-
addActions
(self, Iterable[QAction])¶
-
adjustSize
(self)¶
-
autoFillBackground
(self) → bool¶
-
backgroundRole
(self) → QPalette.ColorRole¶
-
baseSize
(self) → QSize¶
-
blit
(bbox=None)¶ Blit the region in bbox.
-
property
blitbox
¶ Deprecated since version 2.1: The blitbox function was deprecated in version 2.1.
-
blockSignals
(self, bool) → bool¶
-
buffer_rgba
()¶ Get the image as an RGBA byte string
draw
must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.bytes
Backend derived classes should call this function on any mouse button press. x,y are the canvas coords: 0,0 is lower, left. button and key are as defined in
MouseEvent
.This method will be call all functions connected to the ‘button_press_event’ with a
MouseEvent
instance.
Backend derived classes should call this function on any mouse button release.
This method will call all functions connected to the ‘button_release_event’ with a
MouseEvent
instance.- xscalar
the canvas coordinates where 0=left
- yscalar
the canvas coordinates where 0=bottom
- guiEvent
the native UI event that generated the mpl event
-
changeEvent
(self, QEvent)¶
-
childAt
(self, QPoint) → QWidget¶ childAt(self, int, int) -> QWidget
-
childEvent
(self, QChildEvent)¶
-
children
(self) → List[QObject]¶
-
childrenRect
(self) → QRect¶
-
childrenRegion
(self) → QRegion¶
-
clearFocus
(self)¶
-
clearMask
(self)¶
-
close
(self) → bool¶
-
closeEvent
(self, QCloseEvent)¶
-
close_event
(guiEvent=None)¶ Pass a
CloseEvent
to all functions connected toclose_event
.
-
colorCount
(self) → int¶
-
connectNotify
(self, QMetaMethod)¶
-
contentsMargins
(self) → QMargins¶
-
contentsRect
(self) → QRect¶
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
contextMenuPolicy
(self) → Qt.ContextMenuPolicy¶
-
copy_from_bbox
(bbox)¶
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
createWindowContainer
(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget¶
-
cursor
(self) → QCursor¶
-
customContextMenuRequested
¶ customContextMenuRequested(self, QPoint) [signal]
-
customEvent
(self, QEvent)¶
-
deleteLater
(self)¶
-
depth
(self) → int¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
destroyed
¶ destroyed(self, object: QObject = None) [signal]
-
devType
(self) → int¶
-
devicePixelRatio
(self) → int¶
-
devicePixelRatioF
(self) → float¶
-
devicePixelRatioFScale
() → float¶
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
draw
()¶ Draw the figure using the renderer
-
drawRectangle
(rect)¶
-
draw_cursor
(event)¶ Draw a cursor in the event.axes if inaxes is not None. Use native GUI drawing for efficiency if possible
-
draw_event
(renderer)¶ Pass a
DrawEvent
to all functions connected todraw_event
.
-
draw_idle
()¶ Queue redraw of the Agg buffer and request Qt paintEvent.
-
dropEvent
(self, QDropEvent)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → List[QByteArray]¶
-
effectiveWinId
(self) → sip.voidptr¶
-
ensurePolished
(self)¶
-
enterEvent
(self, QEvent)¶
-
enter_notify_event
(guiEvent=None, xy=None)¶ Backend derived classes should call this function when entering canvas
- guiEvent
the native UI event that generated the mpl event
- xytuple of 2 scalars
the coordinate location of the pointer when the canvas is entered
-
event
(self, QEvent) → bool¶
-
events
= ['resize_event', 'draw_event', 'key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'scroll_event', 'motion_notify_event', 'pick_event', 'idle_event', 'figure_enter_event', 'figure_leave_event', 'axes_enter_event', 'axes_leave_event', 'close_event']¶
-
filetypes
= {'eps': 'Encapsulated Postscript', 'jpeg': 'Joint Photographic Experts Group', 'jpg': 'Joint Photographic Experts Group', 'pdf': 'Portable Document Format', 'pgf': 'PGF code for LaTeX', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics', 'tif': 'Tagged Image File Format', 'tiff': 'Tagged Image File Format'}¶
-
find
(sip.voidptr) → QWidget¶
-
findChild
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject¶ findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
-
findChildren
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]¶ findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
-
fixed_dpi
= None¶
-
flush_events
()¶ Flush the GUI events for the figure.
Interactive backends need to reimplement this method.
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPolicy
(self) → Qt.FocusPolicy¶
-
focusPreviousChild
(self) → bool¶
-
focusProxy
(self) → QWidget¶
-
focusWidget
(self) → QWidget¶
-
font
(self) → QFont¶
-
fontInfo
(self) → QFontInfo¶
-
fontMetrics
(self) → QFontMetrics¶
-
foregroundRole
(self) → QPalette.ColorRole¶
-
frameGeometry
(self) → QRect¶
-
frameSize
(self) → QSize¶
-
geometry
(self) → QRect¶
-
getContentsMargins
(self) → Tuple[int, int, int, int]¶
-
get_default_filename
()¶ Return a string, which includes extension, suitable for use as a default filename.
-
classmethod
get_default_filetype
()¶ Get the default savefig file format as specified in rcParam
savefig.format
. Returned string excludes period. Overridden in backends that only support a single file type.
-
get_renderer
(cleared=False)¶
-
classmethod
get_supported_filetypes
()¶ Return dict of savefig file formats supported by this backend
-
classmethod
get_supported_filetypes_grouped
()¶ Return a dict of savefig file formats supported by this backend, where the keys are a file type name, such as ‘Joint Photographic Experts Group’, and the values are a list of filename extensions used for that filetype, such as [‘jpg’, ‘jpeg’].
-
get_width_height
()¶ Return the figure width and height in points or pixels (depending on the backend), truncated to integers
-
get_window_title
()¶ Get the title text of the window containing the figure. Return None if there is no window (e.g., a PS backend).
-
grab
(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) → QPixmap¶
-
grabGesture
(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())¶
-
grabKeyboard
(self)¶
-
grabMouse
(self)¶ grabMouse(self, Union[QCursor, Qt.CursorShape])
-
grabShortcut
(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int¶
-
grab_mouse
(ax)¶ Set the child axes which are currently grabbing the mouse events. Usually called by the widgets themselves. It is an error to call this if the mouse is already grabbed by another axes.
-
graphicsEffect
(self) → QGraphicsEffect¶
-
graphicsProxyWidget
(self) → QGraphicsProxyWidget¶
-
hasFocus
(self) → bool¶
-
hasHeightForWidth
(self) → bool¶
-
hasMouseTracking
(self) → bool¶
-
hasTabletTracking
(self) → bool¶
-
height
(self) → int¶
-
heightForWidth
(self, int) → int¶
-
heightMM
(self) → int¶
-
hide
(self)¶
-
hideEvent
(self, QHideEvent)¶
-
idle_event
(guiEvent=None)¶ Deprecated since version 2.1: The idle_event function was deprecated in version 2.1.
Called when GUI is idle.
-
inherits
(self, str) → bool¶
-
initPainter
(self, QPainter)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
inputMethodHints
(self) → Qt.InputMethodHints¶
-
inputMethodQuery
(self, Qt.InputMethodQuery) → Any¶
-
SmatplotlibCanvas.insertAction(self, QAction, QAction)
-
insertActions
(self, QAction, Iterable[QAction])¶
-
installEventFilter
(self, QObject)¶
-
isActiveWindow
(self) → bool¶
-
isAncestorOf
(self, QWidget) → bool¶
-
isEnabled
(self) → bool¶
-
isEnabledTo
(self, QWidget) → bool¶
-
isFullScreen
(self) → bool¶
-
isHidden
(self) → bool¶
-
isLeftToRight
(self) → bool¶
-
isMaximized
(self) → bool¶
-
isMinimized
(self) → bool¶
-
isModal
(self) → bool¶
-
isRightToLeft
(self) → bool¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isVisible
(self) → bool¶
-
isVisibleTo
(self, QWidget) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindow
(self) → bool¶
-
isWindowModified
(self) → bool¶
-
isWindowType
(self) → bool¶
-
is_saving
()¶ Returns whether the renderer is in the process of saving to a file, rather than rendering for an on-screen buffer.
-
property
keyAutoRepeat
¶ If True, enable auto-repeat for key events.
-
keyPressEvent
(self, QKeyEvent)¶
-
keyReleaseEvent
(self, QKeyEvent)¶
-
key_press_event
(key, guiEvent=None)¶ Pass a
KeyEvent
to all functions connected tokey_press_event
.
-
key_release_event
(key, guiEvent=None)¶ Pass a
KeyEvent
to all functions connected tokey_release_event
.
-
keyboardGrabber
() → QWidget¶
-
killTimer
(self, int)¶
-
layout
(self) → QLayout¶
-
layoutDirection
(self) → Qt.LayoutDirection¶
-
leaveEvent
(self, QEvent)¶
-
leave_notify_event
(guiEvent=None)¶ Backend derived classes should call this function when leaving canvas
- guiEvent
the native UI event that generated the mpl event
-
locale
(self) → QLocale¶
-
logicalDpiX
(self) → int¶
-
logicalDpiY
(self) → int¶
-
lower
(self)¶
-
mapFrom
(self, QWidget, QPoint) → QPoint¶
-
mapFromGlobal
(self, QPoint) → QPoint¶
-
mapFromParent
(self, QPoint) → QPoint¶
-
mapTo
(self, QWidget, QPoint) → QPoint¶
-
mapToGlobal
(self, QPoint) → QPoint¶
-
mapToParent
(self, QPoint) → QPoint¶
-
mask
(self) → QRegion¶
-
maximumHeight
(self) → int¶
-
maximumSize
(self) → QSize¶
-
maximumWidth
(self) → int¶
-
metaObject
(self) → QMetaObject¶
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
minimumHeight
(self) → int¶
-
minimumSize
(self) → QSize¶
-
minimumSizeHint
(self) → QSize¶
-
minimumWidth
(self) → int¶
-
minumumSizeHint
()¶
-
motion_notify_event
(x, y, guiEvent=None)¶ Backend derived classes should call this function on any motion-notify-event.
This method will call all functions connected to the ‘motion_notify_event’ with a
MouseEvent
instance.- xscalar
the canvas coordinates where 0=left
- yscalar
the canvas coordinates where 0=bottom
- guiEvent
the native UI event that generated the mpl event
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseEventCoords
(pos)¶ Calculate mouse coordinates in physical pixels
Qt5 use logical pixels, but the figure is scaled to physical pixels for rendering. Transform to physical pixels so that all of the down-stream transforms work as expected.
Also, the origin is different and needs to be corrected.
-
mouseGrabber
() → QWidget¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
move
(self, QPoint)¶ move(self, int, int)
-
moveEvent
(self, QMoveEvent)¶
-
moveToThread
(self, QThread)¶
-
mpl_connect
(s, func)¶ Connect event with string s to func. The signature of func is:
def func(event)
where event is a
matplotlib.backend_bases.Event
. The following events are recognized‘button_press_event’
‘button_release_event’
‘draw_event’
‘key_press_event’
‘key_release_event’
‘motion_notify_event’
‘pick_event’
‘resize_event’
‘scroll_event’
‘figure_enter_event’,
‘figure_leave_event’,
‘axes_enter_event’,
‘axes_leave_event’
‘close_event’
For the location events (button and key press/release), if the mouse is over the axes, the variable
event.inaxes
will be set to theAxes
the event occurs is over, and additionally, the variablesevent.xdata
andevent.ydata
will be defined. This is the mouse location in data coords. SeeKeyEvent
andMouseEvent
for more info.Return value is a connection id that can be used with
mpl_disconnect()
.Usage:
def on_press(event): print('you pressed', event.button, event.xdata, event.ydata) cid = canvas.mpl_connect('button_press_event', on_press)
-
mpl_disconnect
(cid)¶ Disconnect callback id cid
Usage:
cid = canvas.mpl_connect('button_press_event', on_press) #...later canvas.mpl_disconnect(cid)
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
nativeParentWidget
(self) → QWidget¶
-
new_timer
(*args, **kwargs)¶ Creates a new backend-specific subclass of
backend_bases.Timer
. This is useful for getting periodic events through the backend’s native event loop. Implemented only for backends with GUIs.- intervalscalar
Timer interval in milliseconds
- callbackslist
Sequence of (func, args, kwargs) where
func(*args, **kwargs)
will be executed by the timer every interval.
-
nextInFocusChain
(self) → QWidget¶
-
normalGeometry
(self) → QRect¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
onRemove
(ev)¶ Deprecated since version 2.2: The onRemove function was deprecated in version 2.2.
Mouse event processor which removes the top artist under the cursor. Connect this to the ‘mouse_press_event’ using:
canvas.mpl_connect('mouse_press_event',canvas.onRemove)
-
overrideWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
overrideWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
paintEngine
(self) → QPaintEngine¶
-
paintEvent
(e)¶ Copy the image from the Agg canvas to the qt.drawable.
In Qt, all drawing should be done inside of here when a widget is shown onscreen.
-
paintingActive
(self) → bool¶
-
palette
(self) → QPalette¶
-
parent
(self) → QObject¶
-
parentWidget
(self) → QWidget¶
-
physicalDpiX
(self) → int¶
-
physicalDpiY
(self) → int¶
-
pick
(mouseevent)¶
-
pick_event
(mouseevent, artist, **kwargs)¶ This method will be called by artists who are picked and will fire off
PickEvent
callbacks registered listeners
-
pos
(self) → QPoint¶
-
previousInFocusChain
(self) → QWidget¶
-
print_figure
(*args, **kwargs)¶ Render the figure to hardcopy. Set the figure patch face and edge colors. This is useful because some of the GUIs have a gray figure face color background and you’ll probably want to override this on hardcopy.
- filename
can also be a file object on image backends
- orientation{‘landscape’, ‘portrait’}, optional
only currently applies to PostScript printing.
- dpiscalar, optional
the dots per inch to save the figure in; if None, use savefig.dpi
- facecolorcolor spec or None, optional
the facecolor of the figure; if None, defaults to savefig.facecolor
- edgecolorcolor spec or None, optional
the edgecolor of the figure; if None, defaults to savefig.edgecolor
- formatstr, optional
when set, forcibly set the file format to save to
- bbox_inchesstr or
Bbox
, optional Bbox in inches. Only the given portion of the figure is saved. If ‘tight’, try to figure out the tight bbox of the figure. If None, use savefig.bbox
- pad_inchesscalar, optional
Amount of padding around the figure when bbox_inches is ‘tight’. If None, use savefig.pad_inches
- bbox_extra_artistslist of
Artist
, optional A list of extra artists that will be considered when the tight bbox is calculated.
-
print_jpeg
(filename_or_obj, *args, **kwargs)¶ - qualityint
The image quality, on a scale from 1 (worst) to 95 (best). The default is 95, if not given in the matplotlibrc file in the savefig.jpeg_quality parameter. Values above 95 should be avoided; 100 completely disables the JPEG quantization stage.
- optimizebool
If present, indicates that the encoder should make an extra pass over the image in order to select optimal encoder settings.
- progressivebool
If present, indicates that this image should be stored as a progressive JPEG file.
-
print_jpg
(filename_or_obj, *args, **kwargs)¶ - qualityint
The image quality, on a scale from 1 (worst) to 95 (best). The default is 95, if not given in the matplotlibrc file in the savefig.jpeg_quality parameter. Values above 95 should be avoided; 100 completely disables the JPEG quantization stage.
- optimizebool
If present, indicates that the encoder should make an extra pass over the image in order to select optimal encoder settings.
- progressivebool
If present, indicates that this image should be stored as a progressive JPEG file.
-
print_png
(filename_or_obj, *args, **kwargs)¶
-
print_raw
(filename_or_obj, *args, **kwargs)¶
-
print_rgba
(filename_or_obj, *args, **kwargs)¶
-
print_tif
(filename_or_obj, *args, **kwargs)¶
-
print_tiff
(filename_or_obj, *args, **kwargs)¶
-
print_to_buffer
()¶
-
property
(self, str) → Any¶
-
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.
-
raise_
(self)¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
rect
(self) → QRect¶
-
releaseKeyboard
(self)¶
-
releaseMouse
(self)¶
-
releaseShortcut
(self, int)¶
-
release_mouse
(ax)¶ Release the mouse grab held by the axes, ax. Usually called by the widgets. It is ok to call this even if you ax doesn’t have the mouse grab currently.
-
removeAction
(self, QAction)¶
-
removeEventFilter
(self, QObject)¶
-
render
(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))¶ render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
-
repaint
(self)¶ repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)
-
resize
(self, QSize)¶ resize(self, int, int)
-
resizeEvent
(self, QResizeEvent)¶
-
resize_event
()¶ Pass a
ResizeEvent
to all functions connected toresize_event
.
-
restoreGeometry
(self, Union[QByteArray, bytes, bytearray]) → bool¶
-
restore_region
(region, bbox=None, xy=None)¶
-
saveGeometry
(self) → QByteArray¶
-
SmatplotlibCanvas.scroll(self, int, int)
scroll(self, int, int, QRect)
-
scroll_event
(x, y, step, guiEvent=None)¶ Backend derived classes should call this function on any scroll wheel event. x,y are the canvas coords: 0,0 is lower, left. button and key are as defined in MouseEvent.
This method will be call all functions connected to the ‘scroll_event’ with a
MouseEvent
instance.
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setAcceptDrops
(self, bool)¶
-
setAccessibleDescription
(self, str)¶
-
setAccessibleName
(self, str)¶
-
setAttribute
(self, Qt.WidgetAttribute, on: bool = True)¶
-
setAutoFillBackground
(self, bool)¶
-
setBackgroundRole
(self, QPalette.ColorRole)¶
-
SmatplotlibCanvas.setBaseSize(self, int, int)
setBaseSize(self, QSize)
-
SmatplotlibCanvas.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins)
-
setContextMenuPolicy
(self, Qt.ContextMenuPolicy)¶
-
setCursor
(self, Union[QCursor, Qt.CursorShape])¶
-
setDisabled
(self, bool)¶
-
setEnabled
(self, bool)¶
-
setFixedHeight
(self, int)¶
-
setFixedSize
(self, QSize)¶ setFixedSize(self, int, int)
-
setFixedWidth
(self, int)¶
-
setFocus
(self)¶ setFocus(self, Qt.FocusReason)
-
setFocusPolicy
(self, Qt.FocusPolicy)¶
-
setFocusProxy
(self, QWidget)¶
-
setFont
(self, QFont)¶
-
setForegroundRole
(self, QPalette.ColorRole)¶
-
setGeometry
(self, QRect)¶ setGeometry(self, int, int, int, int)
-
setGraphicsEffect
(self, QGraphicsEffect)¶
-
setHidden
(self, bool)¶
-
setInputMethodHints
(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])¶
-
setLayout
(self, QLayout)¶
-
setLayoutDirection
(self, Qt.LayoutDirection)¶
-
setLocale
(self, QLocale)¶
-
setMask
(self, QBitmap)¶ setMask(self, QRegion)
-
setMaximumHeight
(self, int)¶
-
SmatplotlibCanvas.setMaximumSize(self, int, int)
setMaximumSize(self, QSize)
-
setMaximumWidth
(self, int)¶
-
setMinimumHeight
(self, int)¶
-
SmatplotlibCanvas.setMinimumSize(self, int, int)
setMinimumSize(self, QSize)
-
setMinimumWidth
(self, int)¶
-
setMouseTracking
(self, bool)¶
-
setObjectName
(self, str)¶
-
setPalette
(self, QPalette)¶
-
setParent
(self, QWidget)¶ setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
-
setProperty
(self, str, Any) → bool¶
-
setShortcutAutoRepeat
(self, int, enabled: bool = True)¶
-
setShortcutEnabled
(self, int, enabled: bool = True)¶
-
SmatplotlibCanvas.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize)
-
setSizePolicy
(self, QSizePolicy)¶ setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
-
setStatusTip
(self, str)¶
-
setStyle
(self, QStyle)¶
-
setStyleSheet
(self, str)¶
-
SmatplotlibCanvas.setTabOrder(QWidget, QWidget)
-
setTabletTracking
(self, bool)¶
-
setToolTip
(self, str)¶
-
setToolTipDuration
(self, int)¶
-
setUpdatesEnabled
(self, bool)¶
-
setVisible
(self, bool)¶
-
setWhatsThis
(self, str)¶
-
setWindowFilePath
(self, str)¶
-
setWindowFlag
(self, Qt.WindowType, on: bool = True)¶
-
setWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
setWindowIcon
(self, QIcon)¶
-
setWindowIconText
(self, str)¶
-
setWindowModality
(self, Qt.WindowModality)¶
-
setWindowModified
(self, bool)¶
-
setWindowOpacity
(self, float)¶
-
setWindowRole
(self, str)¶
-
setWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
setWindowTitle
(self, str)¶
-
set_window_title
(title)¶ Set the title text of the window containing the figure. Note that this has no effect if there is no window (e.g., a PS backend).
-
show
(self)¶
-
showEvent
(self, QShowEvent)¶
-
showFullScreen
(self)¶
-
showMaximized
(self)¶
-
showMinimized
(self)¶
-
showNormal
(self)¶
-
signalsBlocked
(self) → bool¶
-
size
(self) → QSize¶
-
sizeHint
(self) → QSize¶
-
sizeIncrement
(self) → QSize¶
-
sizePolicy
(self) → QSizePolicy¶
-
stackUnder
(self, QWidget)¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
start_event_loop
(timeout=0)¶ Start a blocking event loop.
Such an event loop is used by interactive functions, such as
ginput
andwaitforbuttonpress
, to wait for events.The event loop blocks until a callback function triggers
stop_event_loop
, or timeout is reached.If timeout is negative, never timeout.
Only interactive backends need to reimplement this method and it relies on
flush_events
being properly implemented.Interactive backends should implement this in a more native way.
-
start_event_loop_default
(timeout=0)¶ Deprecated since version 2.1: The start_event_loop_default function was deprecated in version 2.1.
Start a blocking event loop.
Such an event loop is used by interactive functions, such as
ginput
andwaitforbuttonpress
, to wait for events.The event loop blocks until a callback function triggers
stop_event_loop
, or timeout is reached.If timeout is negative, never timeout.
Only interactive backends need to reimplement this method and it relies on
flush_events
being properly implemented.Interactive backends should implement this in a more native way.
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
statusTip
(self) → str¶
-
stop_event_loop
(event=None)¶ Stop the current blocking event loop.
Interactive backends need to reimplement this to match
start_event_loop
-
stop_event_loop_default
()¶ Deprecated since version 2.1: The stop_event_loop_default function was deprecated in version 2.1.
Stop the current blocking event loop.
Interactive backends need to reimplement this to match
start_event_loop
-
style
(self) → QStyle¶
-
styleSheet
(self) → str¶
-
supports_blit
= True¶
-
switch_backends
(FigureCanvasClass)¶ Instantiate an instance of FigureCanvasClass
This is used for backend switching, e.g., to instantiate a FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is not done, so any changes to one of the instances (e.g., setting figure size or line props), will be reflected in the other
-
tabletEvent
(self, QTabletEvent)¶
-
testAttribute
(self, Qt.WidgetAttribute) → bool¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
toolTip
(self) → str¶
-
toolTipDuration
(self) → int¶
-
tostring_argb
()¶ Get the image as an ARGB byte string
draw
must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.bytes
-
tostring_rgb
()¶ Get the image as an RGB byte string
draw
must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.bytes
-
tr
(self, str, disambiguation: str = None, n: int = - 1) → str¶
-
underMouse
(self) → bool¶
-
ungrabGesture
(self, Qt.GestureType)¶
-
unsetCursor
(self)¶
-
unsetLayoutDirection
(self)¶
-
unsetLocale
(self)¶
-
update
(self)¶ update(self, QRect) update(self, QRegion) update(self, int, int, int, int)
-
updateGeometry
(self)¶
-
updateMicroFocus
(self)¶
-
updatesEnabled
(self) → bool¶
-
visibleRegion
(self) → QRegion¶
-
whatsThis
(self) → str¶
-
wheelEvent
(self, QWheelEvent)¶
-
width
(self) → int¶
-
widthMM
(self) → int¶
-
winId
(self) → sip.voidptr¶
-
window
(self) → QWidget¶
-
windowFilePath
(self) → str¶
-
windowFlags
(self) → Qt.WindowFlags¶
-
windowHandle
(self) → QWindow¶
-
windowIcon
(self) → QIcon¶
-
windowIconChanged
¶ windowIconChanged(self, QIcon) [signal]
-
windowIconText
(self) → str¶
-
windowIconTextChanged
¶ windowIconTextChanged(self, str) [signal]
-
windowModality
(self) → Qt.WindowModality¶
-
windowOpacity
(self) → float¶
-
windowRole
(self) → str¶
-
windowState
(self) → Qt.WindowStates¶
-
windowTitle
(self) → str¶
-
windowTitleChanged
¶ windowTitleChanged(self, str) [signal]
-
windowType
(self) → Qt.WindowType¶
-
x
(self) → int¶
-
y
(self) → int¶