|
From: Yanni <y.g...@ma...> - 2017-02-13 11:43:44
|
Hi Ivana
Many thanks for your reply. The result is all squeezed. This is my
little script:
------------------------------------------------------------------------------
set term pdf
set output 'test.pdf'
set size square
set xrange [1:4000]
set yrange [1:4000]
set palette defined (0 "black", 1 "red", 2 "orange", 3 "green", 4 "blue")
files= system ("ls *.vec")
#files= "file.vec"
pointsize = 1.5
#plot for [ no = 1 : words(files) ] word(files, no) using 1:2 title
'Flow'.no
#plot files u 2:3:1 w l lc palette
plot for [ no = 1 : words(files) ] word(files, no) using 1:2 title
'Flow'.no u 2:3:1 w l lc palette
------------------------------------------------------------------------------
Before I found out about "plot for". I was plotting each file
individually using:
plot files u 2:3:1 w l lc palette
If I try to add these parameters: (u 2:3:1 w l lc pallette) into the
"plot for" syntax, in oder to get a better looking graph, gnuplot is not
happy and gives me this error:
"gnuplotloop.script", line 15: unexpected or unrecognized token
Line 15 is the "plot for" line. Could you please let me know how can I
add these parametes in the "plot for" syntax?
Thank you
On 13/02/17 10:42, ivana richterova wrote:
> Hi Goud,
>
>> plot for [x=1:10] '*.vec' using 1:2 title 'Flow'.x
> this is not how it works.
>
> I guess you this solution:
> #unix,linux
>> files_to_plot=system("ls *.vec")
> #windows
>> files_to_plot=system("dir /b *.vec")
> #then
>> plot for [ no = 1 : words(files_to_plot) ] word(files_to_plot, no) using 1:2 title 'Flow'.no
> Sincerely
>
> Iva
|