Aluode/PerceptionLabPortable
0
1"""2Very simple example demonstrating RemoteGraphicsView.3 4This allows graphics to be rendered in a child process and displayed in the 5parent, which can improve CPU usage on multi-core processors.6"""7 8import pyqtgraph as pg9from pyqtgraph.widgets.RemoteGraphicsView import RemoteGraphicsView10 11app = pg.mkQApp()12 13## Create the widget14v = RemoteGraphicsView(debug=False) # setting debug=True causes both processes to print information15 # about interprocess communication16v.show()17v.setWindowTitle('pyqtgraph example: RemoteGraphicsView')18 19## v.pg is a proxy to the remote process' pyqtgraph module. All attribute 20## requests and function calls made with this object are forwarded to the21## remote process and executed there. See pyqtgraph.multiprocess.remoteproxy22## for more inormation.23plt = v.pg.PlotItem()24v.setCentralItem(plt)25plt.plot([1,4,2,3,6,2,3,4,2,3], pen='g')26 27if __name__ == '__main__':28 pg.exec()29 