GraphicsLayout — pyqtgraph 0.9.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s Graphics Items »

# GraphicsLayout

class `pyqtgraph.` `GraphicsLayout`(parent=None, border=None)

  Used for laying out GraphicsWidgets in a grid. This is usually created automatically as part of a `GraphicsWindow` or `GraphicsLayoutWidget`.

  `__init__`(parent=None, border=None)
  `addItem`(item, row=None, col=None, rowspan=1, colspan=1)

    Add an item to the layout and place it in the next available cell (or in the cell specified). The item must be an instance of a QGraphicsWidget subclass.

  `addLabel`(text=' ', row=None, col=None, rowspan=1, colspan=1, **kargs)

    Create a LabelItem with text and place it in the next available cell (or in the cell specified) All extra keyword arguments are passed to `LabelItem.__init__` Returns the created item.

    To create a vertical label, use angle = -90.

  `addLayout`(row=None, col=None, rowspan=1, colspan=1, **kargs)

    Create an empty GraphicsLayout and place it in the next available cell (or in the cell specified) All extra keyword arguments are passed to `GraphicsLayout.__init__` Returns the created item.

  `addPlot`(row=None, col=None, rowspan=1, colspan=1, **kargs)

    Create a PlotItem and place it in the next available cell (or in the cell specified) All extra keyword arguments are passed to `PlotItem.__init__` Returns the created item.

  `addViewBox`(row=None, col=None, rowspan=1, colspan=1, **kargs)

    Create a ViewBox and place it in the next available cell (or in the cell specified) All extra keyword arguments are passed to `ViewBox.__init__` Returns the created item.

  `getItem`(row, col)

    Return the item in (row, col). If the cell is empty, return None.

  `nextCol`(*args, **kargs)

    Alias of nextColumn

  `nextColumn`()

    Advance to next available column (generally only for internal use–called by addItem)

  `nextRow`()

    Advance to next row for automatic item placement

  `removeItem`(item)

    Remove item from the layout.

### Navigation

- index
- modules |
- next |
- previous |
- pyqtgraph 0.9.8 documentation »
- API Reference »
- Pyqtgraph’s Graphics Items »