GraphicsLayoutWidget — pyqtgraph 0.11.0rc0 documentation

# GraphicsLayoutWidget

class `pyqtgraph.` `GraphicsLayoutWidget`(parent=None, show=False, size=None, title=None, **kargs)

  Convenience class consisting of a `GraphicsView` with a single `GraphicsLayout` as its central item.

  This widget is an easy starting point for generating multi-panel figures. Example:

      w = pg.GraphicsLayoutWidget()
      p1 = w.addPlot(row=0, col=0)
      p2 = w.addPlot(row=0, col=1)
      v = w.addViewBox(row=1, col=0, colspan=2)

  parentQWidget or None

    The parent widget (see QWidget.__init__)

  showbool

    If True, then immediately show the widget after it is created. If the widget has no parent, then it will be shown inside a new window.

  size(width, height) tuple

    Optionally resize the widget. Note: if this widget is placed inside a layout, then this argument has no effect.

  titlestr or None

    If specified, then set the window title for this widget.

  kargs

    All extra arguments are passed to `GraphicsLayout.__init__()`

  This class wraps several methods from its internal GraphicsLayout: `nextRow` `nextColumn` `addPlot` `addViewBox` `addItem` `getItem` `addLabel` `addLayout` `removeItem` `itemIndex` `clear`

  `__init__`(parent=None, show=False, size=None, title=None, **kargs)

    Arguments: |
    parent | Optional parent widget
    useOpenGL | If True, the GraphicsView will use OpenGL to do all of its rendering. This can improve performance on some systems, but may also introduce bugs (the combination of QGraphicsView and QGLWidget is still an ‘experimental’ feature of Qt)
    background | Set the background color of the GraphicsView. Accepts any single argument accepted by `mkColor`. By default, the background color is determined using the ‘backgroundColor’ configuration option (see `setConfigOptions`).