1

the following data sets are generated from program:

1 **1 0.11111**
1 **2 0.22222**
1 **3 0.33333**
1 **4 0.44444**
2 1 0.00185
2 2 0.00005
2 3 0.12355
2 4 0.68124
3 1 0.54875
3 2 0.62155
3 3 0.35895
3 4 0.41588

My question: How do I plot the first 4 row(bold) in 2-dimensional figure? i.e. the following point should be plotted:

(1, 0.11111) 
(2, 0.22222) 
(3, 0.33333) 
(4, 0.44444)

I know I can use "index" directive to plot multiple data sets, if so, double blank lines must come up from the file (in order to distinguish data sets). But I don't want any blank lines to come up. thanks

  • 1
    If the selection criterion for the lines you want to plot is not a fixed number of line but some value on each line, e.g. first value equals 1, then see http://stackoverflow.com/questions/36926994/how-to-plot-a-single-point-from-a-file-with-gnuplot/36940787#36940787 – Joce May 10 '16 at 14:30

1 Answers1

0

you can use every ::0::3 to plot up to the 4th row: Gnuplot plotting data from a file up to some row, and using 2:3 to plot using the 2nd and 3rd column.

Community
  • 1
  • 1