load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" begin wks = gsn_open_wks("png","map_panel") res = True ; Set map options res@gsnDraw = False ; will panel later res@gsnFrame = False res@mpDataBaseVersion = "MediumRes" res@mpDataSetName = "Earth..4" res@mpFillOn = False res@mpOutlineOn = True res@pmTickMarkDisplayMode = "always" res@mpOutlineBoundarySets = "AllBoundaries" res@mpNationalLineThicknessF = 1.5 res@mpProvincialLineThicknessF = 1.5 res@mpGeophysicalLineThicknessF = 1.5 res@mpMinLatF = 24. res@mpMaxLatF = 52. res@mpMinLonF = 93. res@mpMaxLonF = 130. plot1 = gsn_csm_map(wks,res) ;---Retrieve the height used for the first plot and apply to second plot getvalues plot1 "vpHeightF" : vph end getvalues res@vpHeightF = vph res@mpOutlineOn = False res@mpMinLatF = 39.1 res@mpMaxLatF = 41.1 res@mpMinLonF = 115.3 res@mpMaxLonF = 117.3 plot2 = gsn_csm_map(wks,res) china_shp_name = "CHN_adm/CHN_adm1.shp" lnres = True lnres@gsLineColor = "black" lnres@gsLineThicknessF = 1.5 china_id4 = gsn_add_shapefile_polylines(wks,plot2,china_shp_name,lnres) ;************************************************ ; create panel ;************************************************ ; drawNDCGrid(wks) ; for debug purposes, helps locate the plots resP = True ; modify the panel plot resP@gsnPanelMainString = "Maps of different widths, same height" resP@gsnPanelXF = (/0.1,0.6/) resP@gsnPanelDebug = True gsn_panel(wks,(/plot1,plot2/),(/1,2/),resP) ; now draw as one plot end