# use this to histogram a column - especially distribution of scattering angles max=1. #max value min=-1. #min value width=(max-min)/n #interval width #function used to map a value to the intervals hist(x,width)=width*floor(x/width)+width/2.0 set xrange [min:max] #set yrange [0:] #set noytics #to put an empty boundary around the #data inside an autoscaled graph. #set offset graph 0.05,0.05,0.05,0.0 set xtics min,(max-min)/10,max set boxwidth width*0.9 set style fill solid 0.5 #fillstyle set tics out nomirror #set xlabel "px[mrad]" #set ylabel "Frequency" #set ytics 50 #count and plot set multiplot title filename noenhance set multiplot set xtics -1,0.5 #set ytics set size 0.3,0.3 set origin 0.,0. plot filename u (hist(($9*100),width)):($2 > 0 && $2 < 10.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "0-10 us" set origin 0.32,0. plot filename u (hist(($9*100),width)):($2 > 10.e-6 && $2 < 20.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "10-20 us" set origin 0.64,0. plot filename u (hist(($9*100),width)):($2 > 20.e-6 && $2 < 30.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "20-30 us" set origin 0.,0.32 plot filename u (hist(($9*100),width)):($2 > 30.e-6 && $2 < 40.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "30-40 us" set origin 0.32,0.32 plot filename u (hist(($9*100),width)):($2 > 40.e-6 && $2 < 50.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "40-50 us" set origin 0.64,0.32 plot filename u (hist(($9*100),width)):($2 > 50.e-6 && $2 < 60.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "50-60 us" set origin 0.,0.64 plot filename u (hist(($9*100),width)):($2 > 60.e-6 && $2 < 70.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "60-70 us" set origin 0.32,0.64 plot filename u (hist(($9*100),width)):($2 > 70.e-6 && $2 < 80.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "70-80 us" set origin 0.64,0.64 plot filename u (hist(($9*100),width)):($2 > 80.e-6 && $2 < 90.e-6 ? ($2):1/0) smooth freq w boxes lc rgb"green" t "80-90 us"