# use this to histogram a column - especially distribution of scattering angles #filename = 'DownstreamInflectorScattering.dat' max=10.0 #max value min=-10.0 #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 plot filename u (hist(($2)*1.e3,width)):(1.0) smooth freq w boxes lc rgb"green" t "px[mrad]" #,\ #"" u (hist(($4)*1.e3,width)):(1.0) smooth freq w boxes lc rgb"blue" t "py[mrad]"