The pyqtgraph docs states
Displaying windows from within an application
While I consider this approach somewhat lazy, it is often the case that ‘lazy’ is indistinguishable from ‘highly efficient’. The approach here is simply to use the very same functions that would be used on the command line, but from within an existing application. I often use this when I simply want to get a immediate feedback about the state of data in my application without taking the time to build a user interface for it.
In my use case I just want a simple way to display the data and not to build an UI so this is sufficient for me. I use this code:
import pyqtgraph
pyqtgraph.plot([1,3,2])
to plot data.
However, the window closes immediately when the program stops. How can I display the plot so I can see it?