[ncl-talk] contour line label format

Wei Huang whuang at univ-wea.com
Mon Aug 24 07:11:52 MDT 2015


Mary,

Thanks for create this example!

Wei Huang

From: Mary Haley [mailto:haley at ucar.edu]
Sent: Sunday, August 23, 2015 11:40 PM
To: Wei Huang
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] contour line label format

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncl.ucar.edu_Applications_Images_tm-5F8-5Flg.png&d=BQMFaQ&c=qHNyRuJKHYeI-vwTnTfWXq4fkZpyjWUA1LcPL7eQSSQ&r=6RmpIe4P-G8omsHqYS85uBS-3JaNVk3lvOG-hmdOrr8&m=t3odcgioPsQgU6JRWvsdVwd0gwOEVV5hMSrdBndd3Mo&s=MLnAW7GwBKTZVdLQtMdV8QpGZ-SOLOOef0GWLCeP2kI&e=>

You can also read this description:

http://www.ncl.ucar.edu/Document/Graphics/format_spec.shtml<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncl.ucar.edu_Document_Graphics_format-5Fspec.shtml&d=BQMFaQ&c=qHNyRuJKHYeI-vwTnTfWXq4fkZpyjWUA1LcPL7eQSSQ&r=6RmpIe4P-G8omsHqYS85uBS-3JaNVk3lvOG-hmdOrr8&m=t3odcgioPsQgU6JRWvsdVwd0gwOEVV5hMSrdBndd3Mo&s=J9VbOkOGqnZf1wKNqvP8bW5obuQuB7zN4g84s5ugnxg&e=>

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

http://www.ncl.ucar.edu/Applications/contourLab.shtml#ex8
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncl.ucar.edu_Applications_contourLab.shtml-23ex8&d=BQMFaQ&c=qHNyRuJKHYeI-vwTnTfWXq4fkZpyjWUA1LcPL7eQSSQ&r=6RmpIe4P-G8omsHqYS85uBS-3JaNVk3lvOG-hmdOrr8&m=t3odcgioPsQgU6JRWvsdVwd0gwOEVV5hMSrdBndd3Mo&s=ZNuQ_nbWpHAZoQA2TihMpeuz17r-dKyP9ToS_3sKHC4&e=>

This example uses:


  res at cnLineLabelFormat    = "0@;*.3f<mailto: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<mailto: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<mailto:whuang at univ-wea.com>


_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk<https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=BQMFaQ&c=qHNyRuJKHYeI-vwTnTfWXq4fkZpyjWUA1LcPL7eQSSQ&r=6RmpIe4P-G8omsHqYS85uBS-3JaNVk3lvOG-hmdOrr8&m=t3odcgioPsQgU6JRWvsdVwd0gwOEVV5hMSrdBndd3Mo&s=G6zH9-M5oZblc1rB26begg_zyBJ7i4CaY1Hhh5qqWWk&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150824/9b84c099/attachment.html 


More information about the ncl-talk mailing list