Hi All,
I am trying to make 6 panel on one page (landscape), each panel has own
scale and color bar. I set "resP_at_lbLabelBarOn = True" and set
res1_at_cnMinLevelValF and res1_at_cnMaxLevelValF for each panel. But the
color bar didn't show up, and always has two page (second page is blank)
of the plot.
very appreciate for any help!
Chao
below is the script I used.
; $Id$
; Purpose: Plot AMSR-E soil moisture data
begin
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
diri = "/data3/chaoluo/camdst/cam3019aersombf/"
fl_mdl_3 = addfile(diri+"cam3019aersombf_annual.nc","r")
fl_mdl_4 = addfile(diri+"dstmpc01.nc","r")
fl_mdl_5 = addfile(diri+"dstmpc02.nc","r")
fl_mdl_6 = addfile(diri+"dstmpc03.nc","r")
fl_mdl_7 = addfile(diri+"dstmpc04.nc","r")
fl_mdl_8 = addfile(diri+"DSTMPFRC1.nc","r")
fl_mdl_9 = addfile(diri+"DSTMPFRC2.nc","r")
fl_mdl_10 = addfile(diri+"DSTMPFRC3.nc","r")
fl_mdl_11 = addfile(diri+"DSTMPFRC4.nc","r")
if(.not.isvar("dev")) then
dev="ps"; "x11", "ps", or "ncgm"
end if
if(dev.eq."x11") then
wks_id=create "wks" xWorkstationClass noparent
end create
end if ; endif "x11"
if(dev.eq."ps") then
wks_id=create "wks" psWorkstationClass defaultapp
"wkPSFileName":
"/data3/chaoluo/camdst/cam3019aersombf/dust_6p.ps"
end create
end if ; endif "ps"
dstod = fl_mdl_3->DUSTOD_v(0,:,:)
dstmpc1 = fl_mdl_4->DSTMPC01(0,:,:)
dstmpc2 = fl_mdl_5->DSTMPC02(0,:,:)
dstmpc3 = fl_mdl_6->DSTMPC03(0,:,:)
dstmpc4 = fl_mdl_7->DSTMPC04(0,:,:)
dstodt =dstod
dstodt = dstodt*1.0
dstmpct=dstmpc1
dstmpct=dstmpc1+dstmpc2+dstmpc3+dstmpc4
frc1 = fl_mdl_8->DSTMPFRC1(0,:,:)
frc2 = fl_mdl_9->DSTMPFRC2(0,:,:)
frc3 = fl_mdl_10->DSTMPFRC3(0,:,:)
frc4 = fl_mdl_11->DSTMPFRC4(0,:,:)
printVarSummary(dstmpc1)
printVarSummary(dstmpct)
gsn_define_colormap(wks_id,"BlAqGrYeOrRe") ; choose colormap
plot = new(6,graphic)
res1 = True
res1_at_gsnDraw = False
res1_at_gsnFrame = False
res1_at_lbLabelBarOn = False
res1_at_mpPerimOn = False
res1_at_mpGridLatSpacingF = 30.
res1_at_mpGridLonSpacingF = 30.
res1_at_mpFillOn = False
res1_at_cnLineLabelsOn = False
res1_at_cnFillOn = True
res1_at_cnLinesOn = False
res1_at_mpPerimOn = True
res1_at_gsnPaperMargin = 0.25
res1_at_gsnSpreadColors = True
res1_at_cnMinLevelValF = 0.0
res1_at_cnMaxLevelValF = 2.0
res1_at_cnLevelSpacingF = 0.2
res1_at_gsnMaximize = True
res1_at_lbLabelBarOn = False
res1_at_gsnLeftString = ""
res1_at_gsnRightString = ""
res1_at_gsnCenterString = "DUSTOD_v"
plot(0) = gsn_csm_contour_map_ce(wks_id,dstodt,res1)
res1_at_cnMinLevelValF = 0.0
res1_at_cnMaxLevelValF = 500.0
res1_at_cnLevelSpacingF = 50.
res1_at_gsnCenterString = "DSTMPC (mg/m2)"
plot(1) = gsn_csm_contour_map_ce(wks_id,dstmpct,res1)
res1_at_cnMinLevelValF = 0.0
res1_at_cnMaxLevelValF = 1.0
res1_at_cnLevelSpacingF = 0.1
res1_at_gsnCenterString = "DSTMPC01/DSTMPC"
plot(2) = gsn_csm_contour_map_ce(wks_id,frc1,res1)
res1_at_gsnCenterString = "DSTMPC02/DSTMPC"
plot(3) = gsn_csm_contour_map_ce(wks_id,frc2,res1)
res1_at_gsnCenterString = "DSTMPC03/DSTMPC"
plot(4) = gsn_csm_contour_map_ce(wks_id,frc3,res1)
res1_at_gsnCenterString = "DSTMPC04/DSTMPC"
plot(5) = gsn_csm_contour_map_ce(wks_id,frc4,res1)
resP = True
; resP_at_gsnPanelYWhiteSpacePercent = 5
; resP_at_gsnPanelXWhiteSpacePercent = 5
; resP_at_cnFillColors = (/ 5,20,35,50,0,0,65,75,85,96/)
resP_at_gsnMaximize = True
; resP_at_gsnPanelLabelBar = True
resP_at_lbLabelBarOn = True
resP_at_gsnPaperOrientation = "landscape"
; resP_at_lbOrientation = "vertical" ; vertical label bar
resP_at_lbOrientation = "horizontal"
resP_at_lbLabelAutoStride = True ; nice label bar labels
resP_at_lbTitleOn = True
; resP_at_lbTitleString = "Sig lvl"
resP_at_lbTitlePosition = "Bottom"
resP_at_lbTitleFontHeightF = .012
resP_at_lbTitleDirection = "Across"
; resP_at_txString = title
gsn_panel(wks_id,plot,(/3,2/),resP)
frame(wks_id)
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 10 2006 - 19:34:37 MDT
This archive was generated by hypermail 2.2.0 : Tue Jul 11 2006 - 08:13:14 MDT