[ncl-talk] contour line label format

Mary Haley haley at ucar.edu
Sun Aug 23 22:40:02 MDT 2015


Hi Wei,

The xxYYYYFormat resources don't work like the formatting in sprintf or
sprinti.

Please see this tickmark formatting example image, which shows what the
different strings are you can use:

http://www.ncl.ucar.edu/Applications/Images/tm_8_lg.png

You can also read this description:

http://www.ncl.ucar.edu/Document/Graphics/format_spec.shtml

I created a new example, since we didn't have any that use this resource:

http://www.ncl.ucar.edu/Applications/contourLab.shtml#ex8

This example uses:

  res at cnLineLabelFormat    = "0@;*.3f"                      ; Only one
value after decimal point


--Mary



On Fri, Aug 21, 2015 at 12:11 PM, Wei Huang <whuang at univ-wea.com> wrote:

> Hi, there,
>
> I am doing contour lines, and want to label those lines properly.
> I need the line label's to have one decimal, so I set.
> res at cnLineLabelFormat      = "%6.1f"
> But it seems it did not work well, but only have the integers.
>
> Here is the part of the resource:
>
>    res at cnMinLevelValF            = 1010.0
>   res at cnMaxLevelValF            = 1020.0
>   res at cnLineLabelInterval     = 1
>   res at cnLevelSpacingF           = 0.5
>   res at cnLineLabelFormat      = "%6.1f"
>
> What I hope to get the line labels to have:
> 1015.0, 1015.5, 1016.0
> Not (as it happens now):
> 1015 1015 1016.
>
> Thanks,
>
> Wei Huang
> whuang at univ-wea.com
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150823/c0d7a9d5/attachment.html 


More information about the ncl-talk mailing list