0

I have a data file that is formatted as following:

1 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
2 0.943177 1.305333 1.735536 1.797774 1.598829 1.737834 1.740041 1.912885 1.566793 2.019060
3 0.939475 1.358506 2.321663 1.853523 1.959409 2.510413 2.150453 2.398809 2.416171 2.565402
4 1.088087 1.123924 2.432605 2.590402 2.093655 3.088580 2.607818 3.159053 2.510439 2.821530
5 1.015587 1.258744 2.416498 2.580757 3.060878 2.942430 3.000413 3.253305 3.690752 3.959206
6 0.944150 1.315485 2.414785 2.574164 3.124374 4.351301 3.059047 3.702346 3.444113 4.392897
7 0.995709 1.645348 2.405321 2.613974 3.081145 4.353721 4.484388 3.194175 3.711591 4.668821
8 1.009326 1.492901 2.358513 2.523792 3.115867 4.392143 4.509854 5.086435 3.266735 4.590688
9 1.042647 1.327413 2.431767 2.577399 3.086926 4.381097 4.438063 5.144038 5.155699 4.230450
10 1.075849 1.291292 2.444103 2.584868 3.073117 4.328016 4.432163 5.145352 5.122751 7.421389

Those are 10 rows and 11 columns, with the first column being the values of the X-Axis. I want to draw a separate line for the values of every remaining column. The count of rows and columns can vary, since this is the output of a script.

I want to plot those data using gnuplot. I tried

plot "< ./plotscript" matrix using 1:3:2 ever 1::1 with lines palette

but that draws the rows as lines and not the columns.

  • If the number of columns isn't known in advance, then you may need to do something like this: Auto plotting all columns – steeldriver Apr 30 at 0:31
  • Check out this stackoverflow answer which does auto detection and plotting of rows and columns. – meuh Apr 30 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.