Why is ^C activating Gnuplot?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is ^C activating Gnuplot?

Eyal Doron
Hi,
   Maybe someone (John?) can shed light on this. I have
automatic_replot="true". Now, whenever I abort a calculation
using Ctrl-C, the gnuplot window comes to the top. Why? This
is not in the middle of a graphics operation, just a normal
calculation.

Also, is it possible to make the focus stay in the main Octave
window after a replot? Its irritating to bring it back up again
every time.

Eyal Doron

Reply | Threaded
Open this post in threaded view
|

Why is ^C activating Gnuplot?

John W. Eaton-6
Eyal Doron <[hidden email]> wrote:

:    Maybe someone (John?) can shed light on this. I have
: automatic_replot="true". Now, whenever I abort a calculation
: using Ctrl-C, the gnuplot window comes to the top. Why? This
: is not in the middle of a graphics operation, just a normal
: calculation.

When gnuplot is executed from Octave, they are both in the same
process group.  When you send an interrupt signal with Control-C, it
is delivered to both processes.  When Octave gets an interrupt signal,
it attempts to stop the current calculation (if any) and return to the
top-level prompt.  It appears that gnuplot (at least as of version 3.5)
responds to interrupts by going into graphics mode.  If you are using
X, that means that the graphics window is raised and the cursor is
warped there.  This should be independent of the value of
automatic_replot.

I don't particularly like this behavior either.  Does anyone know if
gnuplot 3.6 also works this way (raising the plot window on replot or
interrupt)?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Why is ^C activating Gnuplot?

niles-3

To Gnuplot 3.6beta developers, (David Denholm)

It seems a ^C will cause the graphics window to come to the front in
Gnuplot 3.5.  This behavior has not changed as of Gnuplot 3.6beta
pl219, which is somewhat recent. Could this be changed in Gnuplot 3.6
for the benefit of Octave users?  Perhaps an option flag could be used
if it's important for something else.  Why does it do this at all?

        Thanks,
        Rick Niles.


>From Octave mailing list:
-------------------------------------------------
Eyal Doron <[hidden email]> wrote:

:    Maybe someone (John?) can shed light on this. I have
: automatic_replot="true". Now, whenever I abort a calculation
: using Ctrl-C, the gnuplot window comes to the top. Why? This
: is not in the middle of a graphics operation, just a normal
: calculation.

John Eaton <[hidden email]> wrote:

>When gnuplot is executed from Octave, they are both in the same
>process group.  When you send an interrupt signal with Control-C, it
>is delivered to both processes.  When Octave gets an interrupt signal,
>it attempts to stop the current calculation (if any) and return to the
>top-level prompt.  It appears that gnuplot (at least as of version 3.5)
>responds to interrupts by going into graphics mode.  If you are using
>X, that means that the graphics window is raised and the cursor is
>warped there.  This should be independent of the value of
>automatic_replot.
>
>I don't particularly like this behavior either.  Does anyone know if
>gnuplot 3.6 also works this way (raising the plot window on replot or
>interrupt)?
>
>jwe