Hello,
(1)
I am having trouble trying to get my minor tick
marks to "line up" with my major tick marks.
An example program is below.
Is there some way to get the minor ticks to "line up" ?
It seems that gsn and tm control some aspect
of tick marks, but mp does not ?
(2)
I am trying to use gsnMinorLonSpacing, etc.
It is stated that "gsnMinorLatSpacing - Used to indicate the latitude
spacing
to use for minor tickmarks and their labels in any gsn_csm routine that
is
generating a cylindrical equidistant map and contains a latitude axis."
Is there a general method for all projections ?
(3)
Will the "tm" resource help out ?
Thanks, Bruce
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
maxlat = 45.0
minlat = 15.0
maxlon = -60.0
minlon = -100.0
deginc = 5.0
deg2rad = acos(-1)/180.0
lat = ispan(floattoint(minlat),floattoint(maxlat),1)*1.0
lon = ispan(floattoint(minlon),floattoint(maxlon),1)*1.0
data = new( (/ dimsizes(lat), dimsizes(lon) /), float )
data = cos(deg2rad*conform(data,lat,0)) *
sin(deg2rad*(conform(data,lon,1)*conform(data,lat,0))/10.0)
data!1 = "Longitude"
data&Longitude = lon
data&Longitude_at_units = "degrees_east"
data!0 = "Latitude"
data&Latitude = lat
data&Latitude_at_units = "degrees_north"
wks_type = "x11"
wks_name = "TEST_TICKS"
wks = gsn_open_wks(wks_type,wks_name)
res = True
res_at_mpShapeMode = "FreeAspect"
alpha = 0.7
res_at_vpHeightF = alpha
res_at_vpWidthF = alpha
cmap = (/(/1.00, 1.00, 1.00/),(/0.00, 0.00, 0.00/), \
(/0.51, 0.13, 0.94/),(/0.00, 0.00, 0.59/), \
(/0.00, 0.00, 0.80/),(/0.25, 0.41, 0.88/), \
(/0.12, 0.56, 1.00/),(/0.00, 0.75, 1.00/), \
(/0.63, 0.82, 1.00/),(/0.82, 0.96, 1.00/), \
(/1.00, 1.00, 0.78/),(/1.00, 0.88, 0.20/), \
(/1.00, 0.67, 0.00/),(/1.00, 0.43, 0.00/), \
(/1.00, 0.00, 0.00/),(/0.78, 0.00, 0.00/), \
(/0.63, 0.14, 0.14/),(/1.00, 0.41, 0.70/)/)
gsn_define_colormap(wks,cmap)
landColor = NhlNewColor(wks,.96,.87,.7)
lastMapColor = landColor - 1
lastColor = landColor
grayColor = NhlNewColor(wks,0.7,0.7,0.7)
lastColor = grayColor
res_at_gsnSpreadColorStart = 1 ;.. 0=white, 1=black, default=2
res_at_gsnSpreadColorEnd = lastMapColor
res_at_cnFillOn = True
res_at_cnFillDrawOrder = "PreDraw"
res_at_cnFillMode = "RasterFill"
res_at_cnLinesOn = False
;.. Label bar stuff is in "cn" and "lb" and "pm"
res_at_lbLabelBarOn = True
res_at_lbOrientation = "vertical"
res_at_pmLabelBarOrthogonalPosF = 0.1
res_at_lbLabelStride = 1 ;.. Stride on label bar.
;.. This affects which labels show if lbLabelStride .ne. 1
res_at_cnLabelBarEndLabelsOn = False
res_at_cnLabelBarEndLabelsOn = True
res_at_lbTitleString = "Meters"
res_at_lbTitleOffsetF = -0.03
res_at_gsnAddCyclic = False
res_at_mpMaxLatF = maxlat
res_at_mpMinLatF = minlat
res_at_mpMinLonF = minlon
res_at_mpMaxLonF = maxlon
res_at_gsnMajorLatSpacing = deginc
res_at_gsnMajorLonSpacing = deginc
res_at_gsnMinorLonSpacing = deginc/2.0
res_at_gsnMinorLatSpacing = deginc/2.0
;;; res_at_tmXBMode = "Manual"
;;; res_at_tmXBTickStartF = minlon
;;; res_at_tmXBTickEndF = maxlon
;;; res_at_tmXBTickSpacingF = deginc
;;; res_at_tmXBMinorPerMajor = 1
;;; res_at_pmTickMarkDisplayMode = "Always"
res_at_tiMainString = "Test Tickmarks"
res_at_tiMainOffsetYF = 0.02
res_at_mpGridAndLimbOn = True
res_at_mpGridLineDashPattern = 2
res_at_mpGridLatSpacingF = deginc
res_at_mpGridLonSpacingF = deginc
res_at_mpGridLineColor = 0 ;.. 0=white
res_at_mpGridLineColor = grayColor ;.. 0=white
font_height = 0.015 ; make fonts larger
res_at_tmYLLabelFontHeightF = font_height
res_at_tmXBLabelFontHeightF = font_height
res_at_tiMainFontHeightF = 1.25 * font_height
res_at_tiMainFontHeightF = 2.00 * font_height
res_at_mpDataBaseVersion = "Ncarg4_1"
res_at_mpOutlineBoundarySets = "NoBoundaries"
res_at_mpOutlineSpecifiers = "NullArea"
res_at_mpOutlineSpecifiers = "Land" ;.. Draw coastline.
res_at_mpGeophysicalLineColor = 1 ;.. Color of coastline
(1=black).
res_at_mpGeophysicalLineThicknessF = 2.0 ;.. Thickness of coastline.
res_at_mpFillOn = False ;.. NOT FILL CONTINENTS.
res_at_mpFillOn = True ;.. FILLS CONTINENTS WITH LAND COLOR.
res_at_mpLandFillColor = landColor ;.. A -1 does NOT reference last
element !!
plot_map =
gsn_csm_contour_map_ce(wks,data({minlat:maxlat},{minlon:maxlon}),res)
delete(wks)
end
=====
Bruce Lunde
Bruce.Lunde_at_navy.mil
228-688-5843
Code NP1
Naval Oceanographic Office
Stennis Space Center, MS
=====
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 25 2007 - 10:00:29 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 26 2007 - 10:02:41 MDT