pro comphistplot,whichplot,printout,filename common GUI_BLOCK common dev_block ttles=['!8S!Iij!3!N','!8l!8!Iij!3','!8s!Iij!3','!8S!Iij!El!3!N',$ '!8l!8!Iij!El!3','!8S!Iij!Es!N!3','!8s!Iij!Es!N!3','!8S!Iij!E0!N!3',$ '!8T!IA!E*!N!3','!4D!8v!3','!8v!ILSR!3','!8T!Iint!3','!4r!8!Irms!3',$ '!8T!E*!IA!N/!4r!8!Irms!3','!10"!8l!8!Iij!N!10"!3',$ '!10"!8l!8!El!Iij!N!10"!3','!10"!8l!8!Iij!N!10"!3',$ '!10"!8l!8!El!Iij!N!10"!3'] tlesup='Distribution' if (printout eq 1) then begin set_plot,'ps' device,file=filename endif pmin=0. pmax=1. if progress(5) eq 1 then begin pmin=0. pmax=2. endif outm=outdata(*,*,whichplot) outm1=outdata1(*,*,whichplot) dat0=outm(where(outm ge 0. and outm le pmax)) dat1=outm1(where(outm1 ge 0. and outm1 le pmax)) x=findgen(101)/100 hist0=histarray(dat0,pmin=pmin,pmax=pmax,x=x0,binsz=bs0) hist1=histarray(dat1,pmin=pmin,pmax=pmax,x=x1,binsz=bs1) if bs0 ge bs1 then begin hist0=histarray(dat0,pmin=pmin,pmax=pmax,x=x2,binsz=bs1) x0=x2 endif else begin hist1=histarray(dat1,pmin=pmin,pmax=pmax,x=x2,binsz=bs0) x1=x2 endelse histnorm0=float(hist0)/total(hist0) histnorm1=float(hist1)/total(hist1) max0=max(histnorm0) max1=max(histnorm1) if max0 gt max1 then begin plot,x0,histnorm0,psym=10,thick=2.5,$ xtitle='SCF Value',ytitle='Fraction of Population',$ title=ttles(whichplot)+'!N Distribution',xrange=[0.,pmax],$ position=[0.1,0.2,0.9,0.9],charsize=1.3 xyouts,0.25,0.075,'Non-Randomized Data',/normal,charsize=1.3 plots,[0.15,0.23],[0.08,0.08],/normal,thick=2.5 xyouts,0.7,0.075,'Randomized Data',/normal,charsize=1.3 plots,[0.6,0.68],[0.08,0.08],/normal,thick=1. oplot,x1,histnorm1,psym=10,thick=1.0 endif else begin plot,x1,histnorm1,psym=10,thick=1.0,$ xtitle='SCF Value',ytitle='Fraction of Population',$ title=ttles(whichplot)+' Distribution',xrange=[0.,pmax],$ position=[0.1,0.2,0.9,0.9],charsize=1.3 xyouts,0.25,0.075,'Non-Randomized Data',/normal,charsize=1. plots,[0.15,0.23],[0.08,0.08],/normal,thick=2.5 xyouts,0.7,0.075,'Randomized Data',/normal,charsize=1. plots,[0.6,0.68],[0.08,0.08],/normal,thick=1. oplot,x0,histnorm0,psym=10,thick=2.5 endelse if (printout eq 1) then begin device,/close set_plot,'x' endif return end