Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2537 > unrolled thread

Make a filname variable

Started byLancelot BOULET <lancelotboulet@gmail.com>
First post2014-07-24 05:36 -0700
Last post2014-07-25 09:40 +0200
Articles 5 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Make a filname variable Lancelot BOULET <lancelotboulet@gmail.com> - 2014-07-24 05:36 -0700
    Re: Make a filname variable Karl <mail.kfr@gmx.net> - 2014-07-24 16:41 +0200
      Re: Make a filname variable Lancelot BOULET <lancelotboulet@gmail.com> - 2014-07-24 12:09 -0700
        Re: Make a filname variable Lancelot BOULET <lancelotboulet@gmail.com> - 2014-07-24 12:39 -0700
          Re: Make a filname variable Karl <mail.kfr@gmx.net> - 2014-07-25 09:40 +0200

#2537 — Make a filname variable

FromLancelot BOULET <lancelotboulet@gmail.com>
Date2014-07-24 05:36 -0700
SubjectMake a filname variable
Message-ID<c0112616-b39d-452a-847a-040cf6329097@googlegroups.com>
Hello everybody,

I would like to make an animation of ma results.
In order to do that, I found a nice solution :

plot './Sol.i.csv' using 1:2 with lines
pause 0.01
i=i+1
if (i<imax) reread

However, my solutions (number of solutions = imax) are like this : 
Sol.0.csv
Sol.1.csv
Sol.2.csv
...

How can I do for making the variable "i" workable in the plot './Sol.i.csv' ?

Thanks a lot in advence for your answers :) 

Lancelot

[toc] | [next] | [standalone]


#2538

FromKarl <mail.kfr@gmx.net>
Date2014-07-24 16:41 +0200
Message-ID<lqr5nq$i8a$1@news.rz.uni-karlsruhe.de>
In reply to#2537
Am 24.07.2014 14:36, schrieb Lancelot BOULET:
> Hello everybody,
> 
> I would like to make an animation of ma results.
> In order to do that, I found a nice solution :
> 
> plot './Sol.i.csv' using 1:2 with lines
> pause 0.01
> i=i+1
> if (i<imax) reread
> 
> However, my solutions (number of solutions = imax) are like this : 
> Sol.0.csv
> Sol.1.csv
> Sol.2.csv
> ....
> 
> How can I do for making the variable "i" workable in the plot './Sol.i.csv' ?
> 
> Thanks a lot in advence for your answers :) 
> 
> Lancelot
> 

You can generate your filenames by a function:

	fname(i) = sprintf('Sol.%i.csv',i)

	do for [i=0:imax] { plot fname(i) }


  Karl

[toc] | [prev] | [next] | [standalone]


#2539

FromLancelot BOULET <lancelotboulet@gmail.com>
Date2014-07-24 12:09 -0700
Message-ID<df46b1ab-d8dc-4432-99b7-3eff9923f208@googlegroups.com>
In reply to#2538
Yes, thanks Karl, it works !

But how can I in order to make a pause like in the expression "pause 0.01" ?

Lancelot

[toc] | [prev] | [next] | [standalone]


#2540

FromLancelot BOULET <lancelotboulet@gmail.com>
Date2014-07-24 12:39 -0700
Message-ID<6d885107-10a2-4436-ad4a-dfd9b561b599@googlegroups.com>
In reply to#2539
Le jeudi 24 juillet 2014 21:09:06 UTC+2, Lancelot BOULET a écrit :
> Yes, thanks Karl, it works !
> 
> 
> 
> But how can I in order to make a pause like in the expression "pause 0.01" ?
> 
> 
> 
> Lancelot

Stupid question, we just have to add pause 0.01, it works well !

Thanks again :)

[toc] | [prev] | [next] | [standalone]


#2541

FromKarl <mail.kfr@gmx.net>
Date2014-07-25 09:40 +0200
Message-ID<lqt1f1$8kb$1@news.rz.uni-karlsruhe.de>
In reply to#2540
Am 24.07.2014 21:39, schrieb Lancelot BOULET:
> Le jeudi 24 juillet 2014 21:09:06 UTC+2, Lancelot BOULET a écrit :
>> Yes, thanks Karl, it works !
>>
>>
>>
>> But how can I in order to make a pause like in the expression "pause 0.01" ?
>>
>>
>>
>> Lancelot
> 
> Stupid question, we just have to add pause 0.01, it works well !
> 
> Thanks again :)
> 

I thought you wanted an animation file. You can make animated gifs with
gnuplot, check "set terminal gif animate 10".

  Karl

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web