| 
 
	积分1132贡献 精华在线时间 小时注册时间2012-11-2最后登录1970-1-1 
 | 
 
| 
问题求助:
x
登录后查看更多精彩内容~您需要 登录 才可以下载或查看,没有帐号?立即注册 
  首先非常感谢您宝贵的时间,
 
 问题描述: ncl自己画的面板图,每个图都有经纬坐标,为了尽可能的放大图像的显示面积,想仅仅把图的左侧和底部坐标显示,其他公用坐标,暂时是自己手动调整每幅图出现的位置,但是遇到坐标轴重影问题? 一直搞不定,特把图和画图设置的脚本贴出来,求大神给支个招?
 
 再次感谢    ~ ~
  
 图 如下
 
 
   
 
 脚本如下
 
 ;************************************************
 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/contributed.ncl"
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl"
 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/wind_rose.ncl"
 ;-------------------------------------------------
 ; There are four region based indices used to monitor the tropical Pacific:
 ; Nino 1+2 (0-10S, 90W-80W), Nino 3 (5N-5S, 150W-90W),
 ; Nino 3.4/ONI (5N-5S, 170W-120W) and Nino 4 (5N-5S, 160E-150W)
 ;-------------------------------------------------
 ;************************************************
 begin
 ;*************  set up  some parameter        *********
 lonL   = 35
 lonR   = 115
 latB   = -30
 latT   = 25
 
 yrStrt = 1982
 yrLast = 2013
 
 
 ;************  open files and  read the data ***********
 ;~~~~~  get the sst and some parameter  ~~~~~~~~~~~
 file_sst = systemfunc("ls /home/gfy/data/NCEP_DOE_Reanalysis2_Summary_daliy/necp_daliy_sst/*nc")
 f_sst    = addfiles(file_sst, "r")
 ListSetType (f_sst,"cat")
 ssts     = f_sst[:]->sst(:,{latB:latT},{lonL:lonR})
 sst      = short2flt(ssts)
 copy_VarCoords(ssts,sst)
 printVarSummary(sst)
 delete(ssts)
 
 balabablabal
 。。。。。。
 。。。。。。
 
 
 ;================================================
 gtest    = (/ugtval/)
 gtest    = (/test/)
 ;  ugrc     = where(abs(ugtval).lt.gtest,ugrc@_FillValue,ugrc)
 ;  vgrc     = where(abs(vgtval).lt.gtest,vgrc@_FillValue,vgrc)
 ugrc     = where(abs(ugtval).lt.gtest.and.abs(vgtval).lt.gtest,ugrc@_FillValue,ugrc)
 vgrc     = where(abs(ugtval).lt.gtest.and.abs(vgtval).lt.gtest,vgrc@_FillValue,vgrc)
 
 tgrc     = where(abs(tgtval).lt.gtest,tgrc@_FillValue,tgrc)
 ; 注:tgrc,ugrc,vgrc 等(lat,lon,49)这么大小的数据
 
 ;************************************************
 ; create plot
 ;************************************************
 wks = gsn_open_wks("pdf" ,"lag_iod_tauxy_ssta")                ; open a ps file
 gsn_define_colormap(wks,"BlWhRe")              ; choose colormap
 ;  gsn_define_colormap(wks,"BlAqGrYeOrRe")        ; choose colormap
 maxlag = 24
 nplot = maxlag*2+1
 plot = new(nplot,graphic)                          ; create a plot array
 
 res                       = True     ; plot mods desired
 resV                      = True
 
 res@gsnDraw              = False              ; don't draw
 res@gsnFrame             = False              ; don't advance frame
 
 resV = res
 
 res@gsnRightString   = ""
 ;  res@gsnLeftString    = "Regression  u v at 850hpa"
 res@gsnLeftString    = ""
 res@gsnCenterString  = ""
 
 res@cnFillOn              = True     ; turn on color fill
 res@cnLinesOn             = False    ; turn of contour lines
 res@cnLevelSelectionMode = "ManualLevels"      ; manually set cn levels
 res@cnMinLevelValF       =  -0.5                 ; min level
 res@cnMaxLevelValF       =    .5                 ; max level
 res@cnLevelSpacingF      =   .1                  ; contour level spacing
 ;  res@cnLevelSpacingF       = 0.5      ; contour spacing
 
 ;---This resource not needed in NCL V6.1.0
 res@gsnSpreadColors       = True     ; use full range of color map
 
 res@lbLabelBarOn          = False
 
 res@lbLabelStride         = 4
 
 res@pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels
 res@mpFillOn = True
 res@gsnAddCyclic =       False
 res@mpCenterLonF =       180
 res@mpMaxLatF = latT                         ; specify the plot domain
 res@mpMinLatF = latB                         ;
 res@mpMinLonF = lonL                        ;
 res@mpMaxLonF = lonR                        ;
 ;  res@mpFillDrawOrder  = "PostDraw"
 res@mpFillDrawOrder  = "PreDraw"
 
 res@tmXBLabelFontHeightF   = 0.020
 res@tmYLLabelFontHeightF   = 0.020
 
 ;------
 res@tmXBLabelsOn           = False
 res@tmXBOn                 = False
 res@tmXTLabelsOn           = False
 res@tmXTOn                 = False
 
 res@tmYRLabelsOn           = False
 res@tmYROn                 = False
 res@tmYLLabelsOn           = False
 res@tmYLOn                 = False
 
 
 
 ;*******************  vector ***********
 resV@vcRefMagnitudeF  = .01                        ; add a reference vector
 resV@vcRefLengthF     = 0.045                     ; what the ref length is
 resV@vcGlyphStyle     = "CurlyVector"             ; turn on curley vectors
 
 ; resV@vcRefAnnoOn      = False
 ;  resV@pmLabelBarDisplayMode    = "Always"          ; Turn on a label bar.
 ;  resV@pmLabelBarWidthF         = 0.08              ; make it thinner
 ;  resV@lbPerimOn                = False             ; no box around it
 
 resV@vcRefAnnoParallelPosF    = 0.98   ; 0.02
 resV@vcRefAnnoOrthogonalPosF  = 0.02   ; 1.0
 resV@vcRefAnnoPerimOn         = False
 resV@vcRefAnnoString2On       = False
 resV@vcFillArrowWidthF        = 0.02
 
 ;=============
 ;图片的位置 信息
 res@vpWidthF  =  0.24
 res@vpHeightF = 0.19
 xp     = (/0.15,0.4,0.65/)
 yp     = (/0.9,0.7,0.5,0.3/)
 gxp    = conform_dims((/4,3/), xp,1 )
 gyp    = conform_dims((/4,3/), yp,0 )
 fxp    = reshape(gxp,12)
 fyp    = reshape(gyp,12)
 
 
 
 ;***************************************
 test  = 1.96
 do it = 0,nplot-1,3        ; 5,16
 inum  = (it-maxlag)
 ip    = it/3
 
 ;===========
 if(ip.eq.11)then
 res@lbLabelBarOn              = True
 res@lbLabelFont               = 25
 res@pmLabelBarParallelPosF    = -0.5
 res@pmLabelBarOrthogonalPosF  = 0.2
 res@pmLabelBarHeightF         = 0.1
 res@pmLabelBarWidthF          = 0.4
 res@lbLabelFontHeightF        = 0.02
 res@lbLabelStride             = 5
 end if
 
 if(ip.le.11)then
 res@gsnCenterString            = inum+" Pentad"
 res@gsnCenterStringFontHeightF = .02
 res@vpXF = fxp(ip)
 res@vpYF = fyp(ip)
 
 ;===========
 plot11 = gsn_csm_contour_map_ce(wks,tgrc(:,:,it), res)
 plot12 = gsn_csm_vector(wks,ugrc(::2,::2,it),vgrc(::2,::2,it),resV)
 overlay(plot11,plot12)
 
 if(inum.eq.-24.or.inum.eq.-15.or.inum.eq.-6)then
 res@tmYLLabelsOn           = True
 res@tmYLOn                 = True
 plot11 = gsn_csm_contour_map_ce(wks,tgrc(:,:,it), res)
 plot12 = gsn_csm_vector(wks,ugrc(::2,::2,it),vgrc(::2,::2,it),resV)
 overlay(plot11,plot12)
 end if
 
 if(inum.eq.6.or.inum.eq.9)then
 res@tmXBLabelsOn           = True
 res@tmXBOn                 = True
 plot11 = gsn_csm_contour_map_ce(wks,tgrc(:,:,it), res)
 plot12 = gsn_csm_vector(wks,ugrc(::2,::2,it),vgrc(::2,::2,it),resV)
 overlay(plot11,plot12)
 end if
 
 if(inum.eq.3)then
 res@tmXBLabelsOn           = True
 res@tmXBOn                 = True
 res@tmYLLabelsOn           = True
 res@tmYLOn                 = True
 plot11 = gsn_csm_contour_map_ce(wks,tgrc(:,:,it), res)
 plot12 = gsn_csm_vector(wks,ugrc(::2,::2,it),vgrc(::2,::2,it),resV)
 overlay(plot11,plot12)
 end if
 
 draw(plot11)
 
 plot(ip) = plot11
 
 res@tmYLLabelsOn           = False
 res@tmYLOn                 = False
 res@tmXBLabelsOn           = False
 res@tmXBOn                 = False
 
 end if
 ;~~~~~~~~~~~~ Add some text words
 txres               = True
 txres@txFontHeightF = 0.03
 gsn_text_ndc(wks,"IOD lead tauxy and ssta ",0.5,.95,txres)
 
 end do
 frame(wks)
 
 ;~~~~~~~~~~~~~~~~~~
 ; create panel
 ;~~~~~~~~~~~~~~~~~~
 resP            = True                         ; modify the panel plot
 resP@gsnFrame         = True                  ; don't advance panel plot
 resP@gsnMaximize           = True              ; make as large as possible
 resP@txString   = "IOD lead  tauxy and ssta "
 resP@gsnPanelLabelBar    = True                ; add common colorbar
 resP@lbLabelFontHeightF  = 0.020               ; make labels smaller
 resP@gsnPanelBottom    = 0.05                   ; add space at bottom
 resP@lbTopMarginF      = 0.1
 ;   resP@lbBoxMinorExtentF = .5
 resP@pmLabelBarHeightF = .1
 
 
 gsn_panel(wks,plot(0:11),(/4,3/),resP)               ; now draw as one plot
 
 
 ;~~~~~~~~~~~~ Add some text words
 ;    txres               = True
 ;    txres@txFontHeightF = 0.015
 ;    gsn_text_ndc(wks,"TIME = "+g_month+" month  ",0.5,0.02,txres)
 
 ;   frame(wks)
 
 ;  maximize_output(wks,True)
 exit
 
 end
 
 
 再次感谢您宝贵的 时间
 
 
 
 | 
 |