Re: stretch the Y axis

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sat, 21 Apr 2007 11:44:16 -0600

Try adding this resource setting, which tells the NCL mapping program
to allow the map to be stretched:

     res_at_mpShapeMode = "FreeAspect"

This resource is documented at:

http://www.ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpShapeMode

--Mary

On Apr 21, 2007, at 11:30 AM, 施 宁 wrote:

> 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"
>
> begin wks=gsn_open_wks("pdf","fig1")
> gsn_define_colormap(wks,"BlWhRe")
> dims=(/37,144/)
> Ius = new(dims,"float")
> pathIus = "4kl.grd"
> Ius = fbindirread(pathIus,0,dims,"float")
> lon=fspan(0,357.5,144)
> lat=fspan(0,90.0,37)
> lon_at_units="degree_east" lat_at_units="degree_north" Ius!0="lat"
> Ius!1="lon"
> Ius&lon=lon
> Ius&lat =lat
> Ius@_FillValue=32766.0
>
>
>
> res = True
> res_at_gsnMaximize = True
> res_at_vpWidthF=0.65 ;& for the map &
> res_at_vpHeightF=0.65 ;& to be draw
> res_at_mpFillOn = False
> res_at_mpMinLatF = 30
> res_at_mpMaxLatF = 60
> res_at_mpCenterLonF =180
>
> res_at_tmXTOn=False ;close the top X axis
> res_at_tmYROn=False ;close the right axis
> res_at_tmXBTickSpacingF=60 res_at_tmYLTickSpacingF=10
> res_at_tmXBMinorOn=False
> res_at_tmYLMinorOn=False
>
> res_at_tmXBMajorLengthF=0.01 res_at_tmXBMajorOutwardLengthF=0.01
> res_at_tmXBLabelDeltaF=-0.6 res_at_tmXBLabelFontHeightF=0.018
> res_at_tmXBLabelFontThicknessF=1.5
> res_at_tmYLMajorLengthF=0.01 ;modify the length
> res_at_tmYLMajorOutwardLengthF=0.01 ;& of axis outward part
> res_at_tmYLLabelDeltaF=-0.6 ; move the axis label closer to
> the axis res_at_tmYLLabelFontHeightF=0.018
> res_at_tmYLLabelFontThicknessF=1.5 res_at_tmYLLabelStride=1
> res_at_tmXMajorGrid =True res_at_tmXMajorGridThicknessF
> =0.5
> res_at_tmXMajorGridLineDashPattern = 2
> res_at_tmYMajorGrid =True res_at_tmYMajorGridThicknessF
> =0.5
> res_at_tmYMajorGridLineDashPattern = 2
> res_at_cnFillOn = True
> res_at_cnLinesOn = False
> res_at_cnLineLabelsOn = False
> res_at_cnInfoLabelOn = False
> res_at_cnLevelSpacingF = 0.05
> res_at_cnSmoothingOn = True res_at_gsnSpreadColors = True
> res_at_gsnSpreadColorStart = 3
> res_at_gsnSpreadColorEnd = -1
>
> res_at_gsnAddCyclic = True
> res_at_lbBoxSizing = "UniformSizing" res_at_lbOrientation = "Vertical"
> res_at_lbLabelFontHeightF =0.018
> res_at_lbBoxLinesOn = False
> res_at_lbBoxMinorExtentF = 0.2
> res_at_lbLabelStride = 10
>
> res_at_lbLeftMarginF = 0.01
> res_at_lbAutoManage = False
> res_at_lbLabelJust = "CenterRight"
>
> plot=gsn_csm_contour_map(wks,Ius({30:60},:),res)
> end
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Apr 21 2007 - 11:44:16 MDT

This archive was generated by hypermail 2.2.0 : Sat Apr 21 2007 - 12:15:58 MDT