I find the following post really help. 
https://stackoverflow.com/questions/43534784/pyqtgraph-in-anaconda-produces-frozen-crashed-python-window?rq=1

"If you want interactive plotting then first type %gui qt in IPython (i.e. 
Jupyter or PyQt Console). This will enable GUI event loop integration 
<http://ipython.readthedocs.io/en/5.x/interactive/magics.html#magic-gui>. 
In the past PyQT could do this by itself but I don't know if it still can, 
so I would just use IPython for this – titusjan 
<https://stackoverflow.com/users/625350/titusjan> Apr 22 '17 at 11:31 
<https://stackoverflow.com/questions/43534784/pyqtgraph-in-anaconda-produces-frozen-crashed-python-window?rq=1#comment74168445_43534784>
 "

On Monday, October 7, 2019 at 12:41:12 PM UTC+8, Ted Zeng wrote:
>
> Yes, the following works, Thanks.
>
> On Sunday, October 6, 2019 at 12:10:31 AM UTC+8, Kenneth Lyons wrote:
>>
>> Note that GraphicsWindow is deprecated in favor of GraphicsLayoutWidget, 
>> but in any case, you'll need to make sure you show the window. In addition, 
>> unless you're running this code in an interactive environment (e.g. the 
>> Python/IPython REPL or running a script with the -i flag), you also need to 
>> run the Qt event loop at the end. Does the following work?
>>
>> import pyqtgraph as pg
>> gw = pg.GraphicsWindow()
>> gw.show()
>> pg.mkQApp().exec_()
>>
>> The documentation here is incomplete but may be helpful: 
>> http://pyqtgraph.org/documentation/qtcrashcourse.html
>>
>> On Thursday, October 3, 2019 at 11:08:02 AM UTC-7, Ted Zeng wrote:
>>>
>>> when I use the following code, the graph crashed.
>>>
>>> import pyqtgraph as pg
>>> win = pg.GraphicsWindow()
>>>
>>> However, when I run the examples, it works.
>>>
>>> import pyqtgraph.examples
>>> pyqtgraph.examples.run()
>>>
>>>
>>> My system configure:
>>> windows 10, 64
>>> python 3.7
>>> pyqtgraph-0.10.0.win-amd64.exe 
>>> <http://pyqtgraph.org/downloads/0.10.0/pyqtgraph-0.10.0.win-amd64.exe>
>>>
>>>
>>> I also find similar bug in this post :
>>> https://bugs.launchpad.net/pyqtgraph/+bug/1782302
>>>
>>> Pleadse advice me how to solve this problem, thanks
>>>
>>> Ted
>>>
>>

-- 
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/edfacd55-2435-4eb3-be6b-5e950e22f577%40googlegroups.com.

Reply via email to