Hi again,

this seems to be working:

on linux you can set command options for the Script plugin with the macro 
shift-control-alt-o and add "-i" to the command arguments to have it run 
python in interactive mode. You can then save the profile and run later 
with shift-control-alt-b.

it still seems to be necessary to do all of the initializing the window 
manually in the code that I put above. Maybe someone can recommend a more 
succinct way of doing this, though.

On Tuesday, February 28, 2017 at 9:09:18 AM UTC-5, tykom wrote:
>
> Hi All,
>
> Just started using pyqtgraph and it's pretty great, love the speed. I've 
> gotten the demos to work pretty easily, but I'm trying to add it to a 
> project that I've been developing using atom as an IDE with the Script 
> plugin and the windows that pyqtgraph creates close instantly. This happens 
> if I run the same file from the terminal too. But if I use pyqtgraph 
> directly from terminal, it's fine.
>
> I've followed the tips from this thread 
> <https://groups.google.com/forum/?fromgroups#!msg/pyqtgraph/grVGbN3sMQA/vJWyXe-GJD0J;context-place=forum/pyqtgraph>
>  
> to no avail. And searching about hasn't yielded anything promising.
>
> This is the demo code that I've been testing:
>
> import numpy as np
> import pyqtgraph as pg
> import pyqtgraph.multiprocess as mp
> import time
>
> pg.mkQApp()
> proc = mp.QtProcess()
> rpg = proc._import('pyqtgraph')
>
> win = rpg.GraphicsWindow()
> plot1 = win.addPlot()
> x = np.linspace(0, 10, 10)
> y = np.linspace(-5, 5, 10)
> curve = plot1.plot(x, y)    # x,y can be lists, arrays, etc.
> curve.setPen('r')
> win.show()
> time.sleep(2)
>
> adding time.sleep keeps the window open for the specified interval but 
> also defeats the purpose of interactive plotting...
>
> thanks for any help!
>

-- 
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/bdaf1427-3872-4a9f-bb2c-58b94512ec8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to