;$Id: ppdf2d_comp_last3prev.pro,v 1.3 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
;
;  Plots B and omega for a run with 2 phases.
;
;  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.4
!x.margin=[7.9,0.7]
!y.margin=[3.2,0.2]
!p.multi=[0,2,1]
;
dir1='for512d6e'
dir2=dir1
;
file1='Larger_pdf2d_lr_lb_2'
file2='Larger_pdf2d_lr_lo_2'
;
offset1=37.2
offset2=-1.3
;
dy=7.0
xr1=[-.04,+.04]
xr1=[-.4,+5.54]
xr2=xr1
y1=-42.0 & yr1=[y1,y1+dy]
y2=  1.02 & yr2=[y2,y2+dy]
lev2=grange(-11.,+2.,11)
lev1=grange(-11.0,-1.0,11)
lev2=grange(-11.0,-1.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_last3.eps"
;spawn,"mv idl.ps ~/GitHub/Axel/SelfGrav/fig/ppdf2d_comp_last.eps"
END
