"persistent" plot windows

  • Thread starter Rodrigo Lopez-Negrete
  • Start date
R

Rodrigo Lopez-Negrete

Hi all,

I'm trying to write a python script using plotting form pylab.
Unfortunatelly I've encountered a problem. When I run the script via
'python myscript.py' the plot windows open and close very quickly, or
when I added the show() command the shell window was locked until I
closed the figures.

My question is: is there a way to open those windows in the background
without blocking the shell and without running it interactively??
something like gnuplot -persist?

Thanks all,
Rodrigo Lopez-Negrete
 
J

James Stroud

Rodrigo said:
Hi all,

I'm trying to write a python script using plotting form pylab.
Unfortunatelly I've encountered a problem. When I run the script via
'python myscript.py' the plot windows open and close very quickly, or
when I added the show() command the shell window was locked until I
closed the figures.

My question is: is there a way to open those windows in the background
without blocking the shell and without running it interactively??
something like gnuplot -persist?

Thanks all,
Rodrigo Lopez-Negrete

python whatever.py &


(Don't forget the ampersand!)

James
 
R

Rodrigo Lopez-Negrete

Hi James,

Thanks for the answer, the ampersand only works if I use the show()
command at the end of my script. I guess that helps although I haven't
tested it with plotting subroutines.

cheers,
Rodrigo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top