0

I would like to do the following thing

set output 'error0.tex'
plot 'error0.dat' using 1:2 title 'Error x', \
error0.dat' using 1:3 title 'Error y'
...
...
set output 'error10.tex'
plot 'error10.dat' using 1:2 title 'Error x', \
error10.dat' using 1:3 title 'Error y'

Is there any simple way to get this?

So i get 10 different files with 2 graphs in it.

1

1 Answer 1

1

Oh my, yes:

do for [ii=0:10] {
  set output 'error'.ii.'.tex'
  plot 'error'.ii.'.dat' u 1:2 t 'Error x', \
    '' u 1:3 t 'Error y'
}

(assuming gnuplot >=4.6)

Type help do, help for or help iteration at the gnuplot prompt for more.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.