[ncl-talk] contour labels
Adam Phillips
asphilli at ucar.edu
Thu Apr 5 10:40:55 MDT 2018
Hi Marston,
Take a look at examples #3, 5, 6 and 7 on the contour labels examples page
here:
http://www.ncl.ucar.edu/Applications/contourLab.shtml
I've had success with the strategies shown in both #3 and #5.
Hope that helps!
Adam
On Wed, Apr 4, 2018 at 9:42 AM, Marston Ward <marston.johnston at gu.se> wrote:
> Hi,
>
> I’m trying to get the contour labels to show up on each contour as well as
> control the size of the labels so that the labels do not cross many
> contours.
> But I’m not getting this to work with the following resource setup:
>
> wksd := gsn_open_wks ("png",oname)
>
> info_string = "IWP: 0 to .4 by .1"
> cnres = True
> cnres at gsnDraw = False
> cnres at gsnFrame = False
> cnres at cnLinesOn = True
> cnres at cnLineColor = "DarkOrchid4"
> cnres at cnFillOn = False
> cnres at cnLineLabelsOn = True
> cnres at cnLineThicknessF = 2.0
> cnres at cnLineLabelBackgroundColor= -1 ; transparent
> cnres at cnInfoLabelOrthogonalPosF = -0.25 ; Move into plot
> ;cnres at cnLineLabelInterval = 1
> ;cnres at cnLineLabelFontHeightF = 0.0001
> cnres at cnInfoLabelString = info_string
> cnres at cnInfoLabelFontColor = "DarkOrchid4"
> cnres at cnInfoLabelPerimOn = False
> cnres at tfDoNDCOverlay = True ; Line up four axes of both
> plots.
> cnres at cnLevelSelectionMode = "ManualLevels" ; set manual
> contour levels
> cnres at cnMinLevelValF = 0. ; set min contour level
> cnres at cnMaxLevelValF = .4 ; set max contour level
> cnres at cnLevelSpacingF = .1 ; set contour spacing
>
> cnres at tiYAxisString = “"
> cnres at tiXAxisString = “"
>
> I’m using the above resource to create overlays on contour plots that will
> be a panel plot, for example:
>
> plotd(0) = gsn_csm_contour_map_overlay(wksd,p(0,:,:),iwp,resd,cnres)
>
> However, I cannot get the labels to change change to a smaller size or
> show up on ever contour, of which there are 5 possible, given the max, min,
> and spacing.
>
> Would love to get some help with this if anyone has an idea what part of
> the resource above is incorrect or missing additional information.
>
> Best,
> /Marston
> _______________________________________________
> 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/20180405/9c189ebe/attachment.html>
More information about the ncl-talk
mailing list