Plotting data arranged in columns rather than rows

Marco <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <20210101184944.4ea342e8@homerow>
Hi,

I have a rather simple data file which is arranged in columns.
However, gnuplot prefers the data in rows and I don't know if
there's a way to plot the data without preprocessing (which I'd like
to avoid).

Here's the sample data:

  Time;10;20;30;40;50
  Mag;100;200;400;750;950
  Att;120;280;550;790;350
  Sol;210;820;550;970;530

It's easy to plot it if it would be laid out in rows:

  set datafile separator ";"
  set key autotitle columnheader
  $DATA << EOD
  Time;Mag;Att;Sol
  10;100;120;210
  20;200;280;820
  30;400;550;550
  40;750;790;970
  50;950;350;530
  EOD
  plot $DATA using 1:2 w l, \
    '' using 1:3 w l, \
    '' using 1:4 w l

Is there a way gnuplot can handle the data file laid out in columns?
I tried using matrix but couldn't get the expected result. Any tips
appreciated.

Marco


_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.