pymor.discretizers.builtin.gui package

Subpackages

Submodules

gl module

This module provides a widget for displaying patch plots of scalar data assigned to 2D-grids using OpenGL. This widget is not intended to be used directly. Instead, use visualize_patch or PatchVisualizer.


class pymor.discretizers.builtin.gui.gl.ColorBarWidget(parent, U=None, vmin=None, vmax=None)[source]

Bases: QGLWidget

Methods

ColorBarWidget

initializeGL, paintEvent, resizeGL, set

QGLWidget

autoBufferSwap, bindTexture, context, convertToGLFormat, deleteTexture, doneCurrent, doubleBuffer, drawTexture, event, format, glDraw, glInit, grabFrameBuffer, initializeOverlayGL, isSharing, isValid, makeCurrent, makeOverlayCurrent, overlayContext, paintEngine, paintGL, paintOverlayGL, qglClearColor, qglColor, renderPixmap, renderText, resizeEvent, resizeOverlayGL, setAutoBufferSwap, setContext, swapBuffers, updateGL, updateOverlayGL

QWidget

acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

QObject

blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, __getattr__

QPaintDevice

colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

simplewrapper

__new__

Attributes

QWidget

customContextMenuRequested, DrawChildren, DrawWindowBackground, IgnoreMask, RenderFlag, RenderFlags, windowIconChanged, windowIconTextChanged, windowTitleChanged

QObject

destroyed, objectNameChanged, staticMetaObject

QPaintDevice

PaintDeviceMetric, PdmDepth, PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

initializeGL(self)[source]
paintEvent(self, QPaintEvent)[source]
ColorBarWidget.resizeGL(self, int, int)[source]

class pymor.discretizers.builtin.gui.gl.GLPatchWidget(parent, grid, vmin=None, vmax=None, bounding_box=([0, 0], [1, 1]), codim=2)[source]

Bases: QGLWidget

Methods

GLPatchWidget

initializeGL, paintGL, resizeGL, set, set_coordinates

QGLWidget

autoBufferSwap, bindTexture, context, convertToGLFormat, deleteTexture, doneCurrent, doubleBuffer, drawTexture, event, format, glDraw, glInit, grabFrameBuffer, initializeOverlayGL, isSharing, isValid, makeCurrent, makeOverlayCurrent, overlayContext, paintEngine, paintEvent, paintOverlayGL, qglClearColor, qglColor, renderPixmap, renderText, resizeEvent, resizeOverlayGL, setAutoBufferSwap, setContext, swapBuffers, updateGL, updateOverlayGL

QWidget

acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

QObject

blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, __getattr__

QPaintDevice

colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

simplewrapper

__new__

Attributes

QWidget

customContextMenuRequested, DrawChildren, DrawWindowBackground, IgnoreMask, RenderFlag, RenderFlags, windowIconChanged, windowIconTextChanged, windowTitleChanged

QObject

destroyed, objectNameChanged, staticMetaObject

QPaintDevice

PaintDeviceMetric, PdmDepth, PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

initializeGL(self)[source]
paintGL(self)[source]
GLPatchWidget.resizeGL(self, int, int)[source]

pymor.discretizers.builtin.gui.gl.colormap_texture(name='viridis')[source]

pymor.discretizers.builtin.gui.gl.compile_shader(source, vertex=True)[source]

Compile a vertex shader from source.


Create a shader program with from compiled shaders.

matplotlib module

This module provides widgets for displaying plots of scalar data assigned to one- and two-dimensional grids using matplotlib. These widgets are not intended to be used directly.


class pymor.discretizers.builtin.gui.matplotlib.Matplotlib1DAxes(U, figure, grid, vmin=None, vmax=None, codim=1, separate_axes=False, sync_timer=None, columns=2)[source]

Bases: pymor.discretizers.builtin.gui.matplotlib.MatplotlibAxesBase

_plot_init()[source]

Setup MPL figure display with empty data.

animate(u)[source]

Load new data into existing plot objects.

set(U, vmin=None, vmax=None)[source]

Load new data into existing plot objects.


class pymor.discretizers.builtin.gui.matplotlib.Matplotlib1DWidget(U, parent, grid, count, vmin=None, vmax=None, legend=None, codim=1, separate_plots=False, dpi=100)[source]

Bases: matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

Methods

Matplotlib1DWidget

set

FigureCanvasQTAgg

paintEvent, print_figure

FigureCanvasAgg

buffer_rgba, copy_from_bbox, draw, get_renderer, print_jpeg, print_jpg, print_png, print_raw, print_rgba, print_tif, print_tiff, print_to_buffer, restore_region, tostring_argb, tostring_rgb

FigureCanvasQT

blit, draw_idle, drawRectangle, enterEvent, flush_events, get_width_height, keyPressEvent, keyReleaseEvent, leaveEvent, minumumSizeHint, mouseDoubleClickEvent, mouseEventCoords, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, resizeEvent, showEvent, sizeHint, start_event_loop, stop_event_loop, wheelEvent

QWidget

acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, layout, layoutDirection, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseGrabber, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

QObject

blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, __getattr__

QPaintDevice

colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

simplewrapper

__new__

FigureCanvasBase

button_press_event, button_release_event, close_event, draw_event, enter_notify_event, get_default_filename, get_default_filetype, get_supported_filetypes, get_supported_filetypes_grouped, get_window_title, grab_mouse, inaxes, is_saving, key_press_event, key_release_event, leave_notify_event, motion_notify_event, mpl_connect, mpl_disconnect, new_timer, pick, pick_event, release_mouse, resize_event, scroll_event, set_window_title, switch_backends

Attributes

FigureCanvasQT

buttond, required_interactive_framework

QWidget

customContextMenuRequested, DrawChildren, DrawWindowBackground, IgnoreMask, RenderFlag, RenderFlags, windowIconChanged, windowIconTextChanged, windowTitleChanged

QObject

destroyed, objectNameChanged, staticMetaObject

QPaintDevice

PaintDeviceMetric, PdmDepth, PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

FigureCanvasBase

button_pick_id, callbacks, events, figure, filetypes, fixed_dpi, scroll_pick_id, supports_blit


class pymor.discretizers.builtin.gui.matplotlib.MatplotlibAxesBase(figure, sync_timer, grid, U=None, vmin=None, vmax=None, codim=2, separate_axes=False, columns=2, aspect_ratio=1)[source]

Bases: object

abstract _plot_init()[source]

Setup MPL figure display with empty data.

abstract animate(u)[source]

Load new data into existing plot objects.

abstract set(U)[source]

Load new data into existing plot objects.


class pymor.discretizers.builtin.gui.matplotlib.MatplotlibPatchAxes(figure, grid, bounding_box=None, U=None, vmin=None, vmax=None, codim=2, columns=2, colorbar=True, sync_timer=None)[source]

Bases: pymor.discretizers.builtin.gui.matplotlib.MatplotlibAxesBase

_plot_init()[source]

Setup MPL figure display with empty data.

set(U, vmin=None, vmax=None)[source]

Load new data into existing plot objects.


class pymor.discretizers.builtin.gui.matplotlib.MatplotlibPatchWidget(parent, grid, bounding_box=None, vmin=None, vmax=None, codim=2, dpi=100)[source]

Bases: matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

Methods

MatplotlibPatchWidget

set

FigureCanvasQTAgg

paintEvent, print_figure

FigureCanvasAgg

buffer_rgba, copy_from_bbox, draw, get_renderer, print_jpeg, print_jpg, print_png, print_raw, print_rgba, print_tif, print_tiff, print_to_buffer, restore_region, tostring_argb, tostring_rgb

FigureCanvasQT

blit, draw_idle, drawRectangle, enterEvent, flush_events, get_width_height, keyPressEvent, keyReleaseEvent, leaveEvent, minumumSizeHint, mouseDoubleClickEvent, mouseEventCoords, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, resizeEvent, showEvent, sizeHint, start_event_loop, stop_event_loop, wheelEvent

QWidget

acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, layout, layoutDirection, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseGrabber, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

QObject

blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, __getattr__

QPaintDevice

colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

simplewrapper

__new__

FigureCanvasBase

button_press_event, button_release_event, close_event, draw_event, enter_notify_event, get_default_filename, get_default_filetype, get_supported_filetypes, get_supported_filetypes_grouped, get_window_title, grab_mouse, inaxes, is_saving, key_press_event, key_release_event, leave_notify_event, motion_notify_event, mpl_connect, mpl_disconnect, new_timer, pick, pick_event, release_mouse, resize_event, scroll_event, set_window_title, switch_backends

Attributes

FigureCanvasQT

buttond, required_interactive_framework

QWidget

customContextMenuRequested, DrawChildren, DrawWindowBackground, IgnoreMask, RenderFlag, RenderFlags, windowIconChanged, windowIconTextChanged, windowTitleChanged

QObject

destroyed, objectNameChanged, staticMetaObject

QPaintDevice

PaintDeviceMetric, PdmDepth, PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

FigureCanvasBase

button_pick_id, callbacks, events, figure, filetypes, fixed_dpi, scroll_pick_id, supports_blit

qt module

This module provides a few methods and classes for visualizing data associated to grids. We use the Qt widget toolkit for the GUI.


class pymor.discretizers.builtin.gui.qt.PlotMainWindow(U, plot, length=1, title=None)[source]

Bases: QWidget

Base class for plot main windows.

Methods

PlotMainWindow

closeEvent, rewind, slider_changed, speed_changed, step_backward, step_forward, to_end, toggle_play, update_solution

QWidget

acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, resizeEvent, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

QObject

blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, __getattr__

QPaintDevice

colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

simplewrapper

__new__

Attributes

QWidget

customContextMenuRequested, DrawChildren, DrawWindowBackground, IgnoreMask, RenderFlag, RenderFlags, windowIconChanged, windowIconTextChanged, windowTitleChanged

QObject

destroyed, objectNameChanged, staticMetaObject

QPaintDevice

PaintDeviceMetric, PdmDepth, PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

closeEvent(self, QCloseEvent)[source]

pymor.discretizers.builtin.gui.qt._launch_qt_app(main_window_factory, block)[source]

Wrapper to display plot in a separate process.


pymor.discretizers.builtin.gui.qt.background_visualization_method(method='ipython_if_possible')[source]

pymor.discretizers.builtin.gui.qt.visualize_matplotlib_1d(grid, U, codim=1, title=None, legend=None, separate_plots=False, block=False)[source]

Visualize scalar data associated to a one-dimensional Grid as a plot.

The grid’s ReferenceElement must be the line. The data can either be attached to the subintervals or vertices of the grid.

Parameters

grid

The underlying Grid.

U

VectorArray of the data to visualize. If len(U) > 1, the data is visualized as a time series of plots. Alternatively, a tuple of VectorArrays can be provided, in which case several plots are made into the same axes. The lengths of all arrays have to agree.

codim

The codimension of the entities the data in U is attached to (either 0 or 1).

title

Title of the plot.

legend

Description of the data that is plotted. Most useful if U is a tuple in which case legend has to be a tuple of strings of the same length.

separate_plots

If True, use subplots to visualize multiple VectorArrays.

block

If True, block execution until the plot window is closed.


pymor.discretizers.builtin.gui.qt.visualize_patch(grid, U, bounding_box=([0, 0], [1, 1]), codim=2, title=None, legend=None, separate_colorbars=False, rescale_colorbars=False, backend='gl', block=False, columns=2)[source]

Visualize scalar data associated to a two-dimensional Grid as a patch plot.

The grid’s ReferenceElement must be the triangle or square. The data can either be attached to the faces or vertices of the grid.

Parameters

grid

The underlying Grid.

U

VectorArray of the data to visualize. If len(U) > 1, the data is visualized as a time series of plots. Alternatively, a tuple of VectorArrays can be provided, in which case a subplot is created for each entry of the tuple. The lengths of all arrays have to agree.

bounding_box

A bounding box in which the grid is contained.

codim

The codimension of the entities the data in U is attached to (either 0 or 2).

title

Title of the plot.

legend

Description of the data that is plotted. Most useful if U is a tuple in which case legend has to be a tuple of strings of the same length.

separate_colorbars

If True, use separate colorbars for each subplot.

rescale_colorbars

If True, rescale colorbars to data in each frame.

backend

Plot backend to use (‘gl’ or ‘matplotlib’).

block

If True, block execution until the plot window is closed.

columns

The number of columns in the visualizer GUI in case multiple plots are displayed at the same time.

visualizers module


class pymor.discretizers.builtin.gui.visualizers.OnedVisualizer(grid, codim=1, block=False, backend='jupyter_or_matplotlib')[source]

Bases: pymor.core.base.ImmutableObject

Visualize scalar data associated to a one-dimensional Grid as a plot.

The grid’s ReferenceElement must be the line. The data can either be attached to the subintervals or vertices of the grid.

Parameters

grid

The underlying Grid.

codim

The codimension of the entities the data in U is attached to (either 0 or 1).

block

If True, block execution until the plot window is closed.

backend

Plot backend to use (‘jupyter_or_matplotlib’, ‘jupyter’, ‘matplotlib’).

visualize(U, m, title=None, legend=None, separate_plots=True, separate_axes=False, block=None, filename=None, columns=2)[source]

Visualize the provided data.

Parameters

U

VectorArray of the data to visualize. If len(U) > 1, the data is visualized as a time series of plots. Alternatively, a tuple of VectorArrays can be provided, in which case several plots are made into the same axes. The lengths of all arrays have to agree.

m

Filled in by pymor.models.interface.Model.visualize (ignored).

title

Title of the plot.

legend

Description of the data that is plotted. Most useful if U is a tuple in which case legend has to be a tuple of strings of the same length.

block

If True, block execution until the plot window is closed. If None, use the default provided during instantiation.


class pymor.discretizers.builtin.gui.visualizers.PatchVisualizer(grid, bounding_box=([0, 0], [1, 1]), codim=2, backend='jupyter_or_gl', block=False)[source]

Bases: pymor.core.base.ImmutableObject

Visualize scalar data associated to a two-dimensional Grid as a patch plot.

The grid’s ReferenceElement must be the triangle or square. The data can either be attached to the faces or vertices of the grid.

Parameters

grid

The underlying Grid.

bounding_box

A bounding box in which the grid is contained.

codim

The codimension of the entities the data in U is attached to (either 0 or 2).

backend

Plot backend to use (‘jupyter_or_gl’, ‘jupyter’, ‘gl’, ‘matplotlib’).

block

If True, block execution until the plot window is closed.

visualize(U, m, title=None, legend=None, separate_colorbars=False, rescale_colorbars=False, block=None, filename=None, columns=2)[source]

Visualize the provided data.

Parameters

U

VectorArray of the data to visualize. If len(U) > 1, the data is visualized as a time series of plots. Alternatively, a tuple of VectorArrays can be provided, in which case a subplot is created for each entry of the tuple. The lengths of all arrays have to agree.

m

Filled in by pymor.models.interface.Model.visualize (ignored).

title

Title of the plot.

legend

Description of the data that is plotted. Most useful if U is a tuple in which case legend has to be a tuple of strings of the same length.

separate_colorbars

If True, use separate colorbars for each subplot.

rescale_colorbars

If True, rescale colorbars to data in each frame.

block

If True, block execution until the plot window is closed. If None, use the default provided during instantiation.

filename

If specified, write the data to a VTK-file using write_vtk instead of displaying it.

columns

The number of columns in the visualizer GUI in case multiple plots are displayed at the same time.