[ncl-talk] contour line labels not showing
Adam Phillips
asphilli at ucar.edu
Mon Jul 27 10:53:56 MDT 2015
Hi Dave,
I do not see anything amiss with your code, but sometimes the default line
labels can be sparse. See example #6 here on how to increase the number of
line labels:
http://www.ncl.ucar.edu/Applications/contourLab.shtml#ex6
If the above does not help or if you have additional questions please
respond to ncl-talk.
Adam
On Mon, Jul 27, 2015 at 4:33 AM, David Craig <dcdavemail at gmail.com> wrote:
> Hi,
> I am having trouble with contour line labels. They don't seem to appear
> on my map. A short example of how I call them is given below. Anyone see
> what the problem is?
> thanks,
> Dave
>
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ; ================================================;
>
>
> begin
>
>
>
> minlat = 48
> maxlat = 65
> minlon = -21
> maxlon = 0
>
> g = addfile("/data/davcra/GEBCO/GEBCO_2014_2D.nc", "r")
> e = g->elevation({minlat:maxlat},{minlon:maxlon})
>
> wks = gsn_open_wks("png", "map") ; open a file
>
>
> res = True ; plot mods desired
>
> res at cnFillOn = False ; turn on/off color fill
> res at cnLinesOn = True ; turn on/off contour
> lines
> res at cnLineLabelsOn = True ; turn on/off contour
> line labels
> res at cnLevelSelectionMode = "ExplicitLevels" ; set
> explicit contour levels
> res at cnLevels = (/ -1000., -300., -150./) ; set
> levels
>
> res at mpMinLatF = minlat ; range to zoom in on
> res at mpMaxLatF = maxlat
> res at mpMinLonF = minlon
> res at mpMaxLonF = maxlon
> res at gsnAddCyclic = False ; data already has cyclic point
>
> plot = gsn_csm_contour_map(wks,e, res)
>
> end
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150727/9c181e66/attachment.html
More information about the ncl-talk
mailing list