#filename = 'FiberHarp.dat' generated by analyze_harp from harp_plane_hit.dat and by analyze_fibers_harp from fiber_hits.dat #time_bin = 10.e-9 load 'plot.dat' do for [harp=1:4] { set terminal pdf enhanced fontscale 0.5 size 6.0in, 4.0in harp_num=sprintf("%i",harp) tbin=sprintf("%i",time_bin*1.e9) output_file = '727FiberHarp'.harp_num.'-'.tbin.'-x.pdf' set out output_file print 'Harp '.harp_num.' time bin '.tbin.' ns' #set label 'Harp '.harp_num at graph 0.1, 1.04 title = 'harp '.harp_num.' time bin '.tbin.' ns' if(harp==4){title='270-deg Y - time bin '.tbin.' ns '} if(harp==2){title='270-deg Y - time bin '.tbin.' ns '} if(harp==3){title='270-deg X - time bin '.tbin.' ns '} if(harp==1){title='270-deg X - time bin '.tbin.' ns '} set label 'plotting_scripts/single_harp_plots-x.gnu' at graph 1.02,0.02 rotate left font ',6' noenhance set timestamp offset graph 1.04,0.7 rotate font ',6' set labe at graph 0.7,0.9 dir noenhance set xlabel 'Time [micro-s]' set ylabel 'centroid [mm]' set xrange [0:100] time_scale = time_bin/1.e-6 plot filename u ($2*time_scale):($1 == harp ? ($3*1000):1/0) w l t title unset terminal print 'write '.output_file }