title: Gnuplot histogram labels
body: <p>I have one minor problem: I need the corresponding heigh value for each histogram box, but only get one. The code and the image is attached below. Thank you all in advance!</p>
  <p>The input file has the following data structure, all in one line:</p>
  <p>large        7995 medium          11 small           1</p>
  <pre><code>
  set terminal png
  set term pngcairo dashed
  set title  &quot; Grain Size vs N of Zones&quot;
  set ylabel &quot;N of zones&quot;
  set style fill solid 1.0
   
  set yr [0.0:8500]
  
  filename2(n) = sprintf(&quot;f_vs_a_%03.0f_25.dat&quot;, n)
  outfile  (n) = sprintf(&quot;f_vs_a_%03.0f_25.png&quot;, n)
  
  
  set style data histograms
  
  do for [N=1:86] {
      set output outfile(N)
      infile = filename2(N)
  
      plot for [i=N:N] filename2  (i) using 2:xtic(2)  title 'large',\
           for [i=N:N] filename2  (i) using 4:xtic(4)  title 'medium',\
           for [i=N:N] filename2  (i) using 4:xtic(4)  title 'small',\
                   
         }
  EOF
  </code></pre>
  <p><a href="https://i.stack.imgur.com/4tCq3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4tCq3.png" alt="enter image description here" /></a></p>