#337 handle multiple files in 'using' command


It would be nice, if I could compare two files (simulations on two slightly different setups) with each other. Up to now it is possible to plot two files into the same window, but I'm interested in manipulating one file A depending on the value in the other file B:

to plot the difference of, say, the difference along the magnetic field-strength (column 6 in both files) along the z-axis (column 1)

plot '/base_dir/' using $fileA$1 : $fileA$6-$fileB$6

If this is already implemented, please note this in the documentation, as I did not find anything :)

Thanks & keep up the good work!!


  • Karl Ratzsch

    Karl Ratzsch - 2012-08-15

    On a unix console, you can simply use "paste"

    gnuplot> plot "< paste file1 file2" using 1:($2-$4)

    , it can even merge more than two files. Then you can also let plot compare abscissa values, calculate averages, or the like.

    linux console on MS windows is available (among others) via cygwin.

  • Ethan Merritt

    Ethan Merritt - 2012-11-04
    • status: open --> open-remind

Log in to post a comment.