Re: map/ explicit tickmarks/ tmYLeft resource

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 19 2013 - 09:09:19 MDT

Hi Sam,

The X axis labels will appear on the bottom axis by default, so if this is what you want, then set the XB resources instead of the XT resources, and don't set:

> res@tmXUseBottom = False ; Keep top axis independent of bottom.

If you want both X axes to be labeled, then keep the XT resources, but still don't set the above resource.

For the Y axis, I think you just have a misspelling:

> res@tmYUseLeft = False ; Keep right axis independent of bottom.

You need the word "Use" in there. The script should have given you an error message about the the misspelled resource.

--Mary

On Jul 18, 2013, at 5:42 PM, Sam McClatchie (NOAA Federal) <sam.mcclatchie@noaa.gov> wrote:

> Colleagues
>
> I have a rather simple question, I think. I have edited a map to be large scale so the default tickmarks for lat and long are not where they look tidy. So I want to set explicit tickmarks and have managed this fine for the x-axis, but not the y-axis. Also, I'd prefer to have the tickmarks that are currently on the upper x-axis actually appear on the lower x-axis. My code snippet follows. Have I made a mistake with my use of the tmYLeft resource?
>
> ;;;;;;;;;;;;;;;;;
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> wks = gsn_open_wks("pdf","../figures/map_changes_in_egg_distributions_by_decade_by_species") ; open a pdf file
> ; wks = gsn_open_wks("x11","../figures/map_changes_in_egg_distributions_by_decade_by_species") ; open graph
>
> res = True ; plot mods desired
> ; res@gsnMaximize = True ; make ps, pdf, eps, .. large
> res@gsnDraw = False
> res@gsnFrame = False
> res@mpOutlineOn = True ; turn on outline
> res@mpFillOn = True ; map fill
> res@mpMinLatF = 32 ; zoom in on map
> res@mpMaxLatF = 35
> res@mpMinLonF = -123.
> res@mpMaxLonF = -117.
> res@mpDataBaseVersion = "mediumres" ; select database
> ; add additional axis on top of plot
> res@tmXUseBottom = False ; Keep top axis independent of bottom.
> res@tmXTLabelsOn = True ; have tick mark labels
> res@tmXTOn = True ; have tick marks
> res@tmXTMode = "Explicit" ; label independently
> res@tmXTValues = (/-117,-118,-119,-120,-121,-122,-123/)
> res@tmXTLabels = (/"","118","","120W","","122",""/)
>
> res@tmYLeft = False ; Keep top axis independent of bottom.
> res@tmYTLabelsOn = True ; have tick mark labels
> res@tmYTOn = True ; have tick marks
> res@tmYTMode = "Explicit" ; label independently
> res@tmYTValues = (/32,33,34,35/)
> res@tmYTLabels = (/"32","33","34","35"/)
>
> plot = gsn_csm_map_ce(wks,res) ; create map
> ;;;;;;;;;;;;;;;;;;;;
>
> Thanks
>
> Sam
> --
> Sam McClatchie,
> Supervisory oceanographer, Fisheries oceanography
> Southwest Fisheries Science Center, NOAA,
> 8901 La Jolla Shores Dr.
> La Jolla, CA 92037-1509, U.S.A.
> email <Sam.McClatchie@noaa.gov>
> Office: 858 546 7083, Cellular: 858 752 8495
> Research home page <www.fishocean.info>
>
> /\
> ...>><xX(>
> //// \\\\
> <)Xx><<
> ///// \\\\\\
> ><(((>
> >><(((> ...>><xX(>O<)Xx><<
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 19 09:09:28 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 19 2013 - 15:39:06 MDT