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!
The input file has the following data structure, all in one line:
large 7995 medium 11 small 1
set terminal png
set term pngcairo dashed
set title " Grain Size vs N of Zones"
set ylabel "N of zones"
set style fill solid 1.0
set yr [0.0:8500]
filename2(n) = sprintf("f_vs_a_%03.0f_25.dat", n)
outfile (n) = sprintf("f_vs_a_%03.0f_25.png", 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

