title: Multiple data blocks in a single file and a single plot + Markers for each block
body: <p>I have a data file that looks like this :</p>
  
  <pre><code>"curve 0"
  0 0.7800
  10 0.333
  12 0.5136
  24 0.2096
  26 -0.066
  40 -0.674
  42 -1.123
  
  
  "curve 1"
  0 0.876
  2 0.73
  4 0.693
  6 0.672
  10 0.70
  12 0.88
  16 0.95
  148 -0.75
  
  
  "curve 2"
  8 2.2305
  10 2.144
  12 2.13
  76 1.26
  78 0.39
  98 -0.97
  </code></pre>
  
  <p>I would like to plot each block of data independently of the others using gnuplot. Here's the code I'm using for this purpose : </p>
  
  <pre><code>plot 'file' i 0 u 1:2 w lines title columnheader(1),\
  'file' i 1 u 1:2 w lines title columnheader(1),\
  'file' i 2 u 1:2 w lines title columnheader(1),\
  'file' i 3 u 1:2 w lines title columnheader(1)
  </code></pre>
  
  <p>It works fine.</p>
  
  <p>Now, I would like to determine in each data block the point (x,y) that has the maximum y-value, and plot it with a marker which has the same color as the curve corresponding to this data block. I tried to use </p>
  
  <pre><code>max_y = GPVAL_DATA_Y_MAX
  replot 'file' u ($2 == max_y ? $2 : 1/0):1
  </code></pre>
  
  <p>after the previous code, but it seems that this finds the maximum over the whole second column including all blocks. </p>
  
  <p>The second thing I would like to do is : for each data block and with a marker that has a different shape but the same color (that of the curve) than the marker for the maximums, plot the first line of that block. </p>
  
  <p>Are these two tasks possible with gnuplot and with the way I'm plotting the curves (columnheader)? </p>