Here's a utility function I use to add a plot item to a QWidget, then you
can just call widget.plotItem.plot(...)...
def add_plot(widget):
"""Add a plot item (that will behave nicely) to a basic QWidget (e.g.
generated by QTDesigner).
widget: QWidget
returns None
"""
layout = QtGui.QHBoxLayout()
widget.setLayout(layout)
layout.setSpacing(0)
widget.plotView = pg.GraphicsView()
layout.addWidget(widget.plotView)
widget.plotItem = pg.PlotItem()
widget.plotItem.resize = widget.resize
widget.plotView.setCentralItem(widget.plotItem)
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/3752d61d-f270-4e0b-a362-412e4176ac9a%40googlegroups.com.