[ncl-talk] Help with line labels

Laura Fowler laura at ucar.edu
Fri Dec 15 16:46:20 MST 2017


Hi Adam:

I tried your suggestion (which I think I had also tried earlier) and
that did not help at all. I also tried to add a label when I overlay
only one contour and that did not work either. There must be some
obscure resources that negate adding labels to those contours.

Thanks,
Laura


On Fri, Dec 15, 2017 at 4:28 PM, Adam Phillips <asphilli at ucar.edu> wrote:
> Hi Laura,
> I believe NCL will limit the drawing of line labels if it believes they will
> come close to overlapping, although in this case I'm not sure why it doesn't
> simply draw one for each line.
> See example #5 here:
> http://www.ncl.ucar.edu/Applications/contourLab.shtml#ex5
> and try setting cnLineLabelPlacementMode = "constant"
> and see if that helps. Other examples show how to make sure labels are drawn
> on every line (as opposed to the default behavior of skipping every other
> one.), along with other modifications.
> Adam
>
> On Fri, Dec 15, 2017 at 4:16 PM, Laura Fowler <laura at ucar.edu> wrote:
>>
>> Hello:
>>
>> I have been fussing for quite a while on how to draw labels on the
>> contour line of the attached plot. The 3 contours show the resolution
>> of my variable-resolution mesh. The red, blue, and black contours
>> correspond to a resolution of 4.8 km, 9.6, and 14.4 km, respectively.
>> I am not understanding why I am unable to add at least one label per
>> contour?
>>
>> sres = True
>>
>> sres at gsnDraw          = False
>> sres at gsnFrame         = False
>> sres at gsnMaximize      = False
>> sres at cnFillMode       = "AreaFill"
>> sres at cnFillOn         = False
>> sres at cnLinesOn        = True
>> sres at cnLineLabelsOn   = True
>> sres at cnLineThicknessF = 3.4
>> sres at cnInfoLabelOn    = False
>>
>> sres at cnLevelSelectionMode = "ExplicitLevels"
>> sres at cnLevels             = (/4.8,9.6,14.4/)
>> sres at cnMonoLineColor      = False
>> sres at cnLineColors         = (/"red","blue","black"/)
>> sres at cnMonoLevelFlag      = True
>> sres at cnLevelFlag         = "LineAndLabel"
>>
>> There must be something I am missing, or I am getting confused between
>> sres at cnLevelFlag and sres at cnLevelFlags, but I just can't make it work?
>> I know that it may be a little finnicky to add labels at times, ....
>> Would somebody be able to help me out so that I do not have to add
>> those labels in PowerPoint. If interested, my entire ncl script is in
>>
>> /glade2/scratch2/laura/MPAS.PacificOcean/plots.centeredPacificOceanMesh.15-3km.20151129-20151231
>> (see global_mean.precipitation.ncl).
>>
>>
>> Many thanks,
>> Laura
>>
>>
>>
>>
>>
>> --
>>
>> !-------------------------------------------------------------------------------------------------------------
>> Laura D. Fowler
>> Mesoscale and Microscale Meteorology Division (MMM)
>> National Center for Atmospheric Research
>> P.O. Box 3000, Boulder CO 80307-3000
>>
>> e-mail: laura at ucar.edu
>> phone: 303-497-1628
>>
>>
>> !-------------------------------------------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>



-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------


More information about the ncl-talk mailing list