PlotWidget — pyqtgraph 0.9.8 documentation

### Navigation

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

# PlotWidget

class `pyqtgraph.` `PlotWidget`(parent=None, background='default', **kargs)

  `GraphicsView` widget with a single `PlotItem` inside.

  The following methods are wrapped directly from PlotItem: `addItem`, `removeItem`, `clear`, `setXRange`, `setYRange`, `setRange`, `autoRange`, `setXLink`, `setYLink`, `viewRect`, `setMouseEnabled`, `enableAutoRange`, `disableAutoRange`, `setAspectLocked`, `register`, `unregister`

  For all other methods, use `getPlotItem`.

  `__init__`(parent=None, background='default', **kargs)

    When initializing PlotWidget, parent and background are passed to `GraphicsWidget.__init__()` and all others are passed to `PlotItem.__init__()`.

  `getPlotItem`()

    Return the PlotItem contained within.

### Navigation

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