;$Id: ppdf2d_comp_last.pro,v 1.4 2026/08/03 06:46:10 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=8,yoffset=3
  ;!p.charthick=1.6 & !p.thick=1.6 & !x.thick=1.6 & !y.thick=1.6
  !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3
  col0=0
endif else begin
  col0=255
end
;
;  Also B and omega from collapse run with Eva, 22 paper.
;
;  note that the idl save files are produced with pvar.pro, which, in turn,
;  calls pdf2d,lr,lb,xx,yy,ww,nx,ny,xr=[-1,1]*1.8,yr=[-16.,2.],/unnorm
;
siz=1.
si2=.8
!p.charsize=1.5
!x.margin=[7.9,0.2]
!y.margin=[3.2,0.2]
!p.multi=[0,2,1]
;
dir1='S128a_25_kf10a'
dir2='S128a_25_kf10a'
;
dir1='B128a_25_kf10a'
dir2='B128a_25_kf10a'
file1='Larger_pdf2d_lr_lb_20'
file2='Larger_pdf2d_lr_lo_20'
offset1=4.2
offset2=-1.1
;
dy=2.5
xr1=[-1.8,+1.8]
xr2=xr1
y1=-6.0 & yr1=[y1,y1+dy]
y2= -0.8 & yr2=[y2,y2+dy]
lev2=grange(-11.,+2.,11)
lev1=grange(-6.0,+0.0,11)
lev2=grange(-6.0,+0.0,11)
;
!x.title='!6ln!7q!6'
!y.title='!6ln!8B!6'
!p.title='!6'
restore,'../'+dir1+'/'+file1+'.sav'
contour,-alog(ww>1.),xx,yy,lev=lev1,/fil,xr=xr1,yr=yr1
xr=minmax(xx) & oplot,xr,xr*2./3.-offset1,col=255
print,xr*2./3.-offset1
;
!y.title='!6ln!7x!6'
!p.title='!6'
restore,'../'+dir2+'/'+file2+'.sav'
contour,-alog(ww>1.),xx,yy,lev=lev2,/fil,xr=xr2,yr=yr2
xr=minmax(xx) & oplot,xr,xr*2./3.-offset2,col=255
print,xr*2./3.-offset2
;
col=0
!p.title='!6ln!8P!6'
!y.title='!6'
!x.title='!6'
xx0=.44 & yy1=.28 & dxx=.03 & dyy=.23
colorbar,pos=[xx0,yy1,xx0+dxx,yy1+dyy], range=minmax(lev1),/bot,/ver,$
form='(f5.1)',charsize=1.0,div=2,ytit='!6',col=col,/rev
;
xx0=.94
colorbar,pos=[xx0,yy1,xx0+dxx,yy1+dyy], range=minmax(lev2),/top,/ver,$
form='(f5.1)',charsize=1.0,div=2,ytit='!6',col=col,/rev
;
print,"$mv idl.ps ~/GitHub/Axel/SelfGrav/fig/ppdf2d_comp_last.eps"
;spawn,"mv idl.ps ~/GitHub/Axel/SelfGrav/fig/ppdf2d_comp_last.eps"
END
