Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2340 > unrolled thread
| Started by | Michael Okuntsov <proximum@land.ru> |
|---|---|
| First post | 2014-03-14 02:40 +0700 |
| Last post | 2017-03-29 02:03 -0700 |
| Articles | 9 — 4 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
exit from the reread loop Michael Okuntsov <proximum@land.ru> - 2014-03-14 02:40 +0700
Re: exit from the reread loop Karl <mail.kfr@gmx.net> - 2014-03-14 09:27 +0100
Re: exit from the reread loop Michael <proximum@land.ru> - 2014-03-14 16:07 +0700
Re: exit from the reread loop Karl <mail.kfr@gmx.net> - 2014-03-14 10:54 +0100
Re: exit from the reread loop Michael <proximum@land.ru> - 2014-03-14 17:06 +0700
Re: exit from the reread loop Karl <mail.kfr@gmx.net> - 2014-03-19 16:03 +0100
Re: exit from the reread loop Karl <mail.kfr@gmx.net> - 2014-03-19 16:06 +0100
Re: exit from the reread loop Michael Okuntsov <proximum@land.ru> - 2014-03-19 23:50 +0700
Re: exit from the reread loop dariomangoni@gmail.com - 2017-03-29 02:03 -0700
| From | Michael Okuntsov <proximum@land.ru> |
|---|---|
| Date | 2014-03-14 02:40 +0700 |
| Subject | exit from the reread loop |
| Message-ID | <lft1hp$edf$1@dont-email.me> |
Hello, the command reread is very useful, but if the gnuplot file is launched, for example, through a desktop shortcut, then untrained user may not understand how to completely close gnuplot window (ctrl+alt+del in Windows, "killall gnuplot" in Linux). Is there a way to close gnuplot window and exit from the endless loop?
[toc] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-03-14 09:27 +0100 |
| Message-ID | <lfuego$2fd$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2340 |
Am 13.03.2014 20:40, schrieb Michael Okuntsov: > Hello, > > the command reread is very useful, but if the gnuplot file is launched, > for example, through a desktop shortcut, then untrained user may not > understand how to completely close gnuplot window (ctrl+alt+del in > Windows, "killall gnuplot" in Linux). Is there a way to close gnuplot > window and exit from the endless loop? Not clear what you mean. Can you show a small example script? you know if (<rereadcondition>) reread , i guess? Also "pause -1" gives the uses an opportunity to stop a script. K
[toc] | [prev] | [next] | [standalone]
| From | Michael <proximum@land.ru> |
|---|---|
| Date | 2014-03-14 16:07 +0700 |
| Message-ID | <lfugsj$nit$1@dont-email.me> |
| In reply to | #2341 |
14.03.2014 15:27, Karl пишет: > Not clear what you mean. Can you show a small example script? > > you know > > if (<rereadcondition>) reread > > , i guess? Also "pause -1" gives the uses an opportunity to stop a script. > > K > We measure a long-term process. It's unknown when it will end. Here is a script: set term wxt enh font ",12" set format y "%.2tE%+02T" unset key set grid xtics set grid ytics plot "/home/michael/tmp/data.dat" u 2:5 w lines lw 2 pause 5 reread
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-03-14 10:54 +0100 |
| Message-ID | <lfujjr$4c8$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2342 |
Am 14.03.2014 10:07, schrieb Michael:
> 14.03.2014 15:27, Karl пишет:
>
>> Not clear what you mean. Can you show a small example script?
>>
>> you know
>>
>> if (<rereadcondition>) reread
>>
>> , i guess? Also "pause -1" gives the uses an opportunity to stop a
>> script.
>>
>> K
>>
>
> We measure a long-term process. It's unknown when it will end. Here is a
> script:
>
> set term wxt enh font ",12"
> set format y "%.2tE%+02T"
> unset key
> set grid xtics
> set grid ytics
>
> plot "/home/michael/tmp/data.dat" u 2:5 w lines lw 2
> pause 5
> reread
You could check for differences between the last two plots. Say the x
axis in your plot gets ever longer:
====
if (!exists("nowmaxx")) nowmaxx = 0 # initialize the variable
lastmaxx = nowmaxx
nowmaxx = GPVAL_DATA_X_MAX
plot ...
if (lastmaxx <> nowmaxx) reread
====
there are other GPVAL_ status variables that are updated after every
plot. Or you could use "stats" on your datafile, and use one of the
stats status variables.
K
[toc] | [prev] | [next] | [standalone]
| From | Michael <proximum@land.ru> |
|---|---|
| Date | 2014-03-14 17:06 +0700 |
| Message-ID | <lfukar$f50$1@dont-email.me> |
| In reply to | #2343 |
14.03.2014 16:54, Karl пишет:
> You could check for differences between the last two plots. Say the x
> axis in your plot gets ever longer:
>
> ====
>
> if (!exists("nowmaxx")) nowmaxx = 0 # initialize the variable
>
> lastmaxx = nowmaxx
> nowmaxx = GPVAL_DATA_X_MAX
>
> plot ...
>
> if (lastmaxx <> nowmaxx) reread
>
> ====
>
> there are other GPVAL_ status variables that are updated after every
> plot. Or you could use "stats" on your datafile, and use one of the
> stats status variables.
>
> K
>
Oh, thanks! I just wasn't sure what condition should I use for exiting.
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-03-19 16:03 +0100 |
| Message-ID | <lgcbj9$u6s$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2344 |
Am 14.03.2014 11:06, schrieb Michael: > 14.03.2014 16:54, Karl пишет: > Does anyone else see five cyrillic letters (transliterating to "wrote") after my name above? WTF? ;-)
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-03-19 16:06 +0100 |
| Message-ID | <lgcbpf$u6s$2@news.rz.uni-karlsruhe.de> |
| In reply to | #2353 |
Am 19.03.2014 16:03, schrieb Karl: > Am 14.03.2014 11:06, schrieb Michael: >> 14.03.2014 16:54, Karl пишет: >> > > Does anyone else see five cyrillic letters (transliterating to "wrote") > after my name above? > i get it. Michael has a .ru email address. ;-)
[toc] | [prev] | [next] | [standalone]
| From | Michael Okuntsov <proximum@land.ru> |
|---|---|
| Date | 2014-03-19 23:50 +0700 |
| Message-ID | <lgcht5$fop$1@dont-email.me> |
| In reply to | #2354 |
19.03.2014 22:06, Karl пишет: > Am 19.03.2014 16:03, schrieb Karl: >> Am 14.03.2014 11:06, schrieb Michael: >>> 14.03.2014 16:54, Karl пишет: >>> >> >> Does anyone else see five cyrillic letters (transliterating to "wrote") >> after my name above? >> > > i get it. Michael has a .ru email address. > > ;-) > Schreiben, schrieb, geschrieben ;)
[toc] | [prev] | [next] | [standalone]
| From | dariomangoni@gmail.com |
|---|---|
| Date | 2017-03-29 02:03 -0700 |
| Message-ID | <9ce478ec-c3cf-4e6d-aca4-0bccc7d37687@googlegroups.com> |
| In reply to | #2340 |
Il giorno giovedì 13 marzo 2014 20:40:26 UTC+1, Michael Okuntsov ha scritto: > Hello, > > the command reread is very useful, but if the gnuplot file is launched, > for example, through a desktop shortcut, then untrained user may not > understand how to completely close gnuplot window (ctrl+alt+del in > Windows, "killall gnuplot" in Linux). Is there a way to close gnuplot > window and exit from the endless loop? It's quite a late reply, but I hope could be useful for other users. Usually I escape from 'reread' loop using a variable and a binding. bind "Close" "reread_loop = 0" reread_loop = 1 if(reread_loop==1) reread I'm using gnuplot5.0. That's my 2 cents. Dario
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web