Re: Rif: Re: [ncl-talk] label bar precision

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu, 11 Dec 2008 12:34:40 -0700

Hi Franco,

Yes, that is exactly the way to control the numerical formatting of
labels when the label bar is attached to a contour plot. The LabelBar
itself only knows about strings. It has no idea whether a string
represents a number or something else. The source of the strings when
a label bar is associated with a contour plot is the line labels.
What might be confusing is that this is true even when line labels
are turned off. (Well maybe it is confusing in any case.)

At some point it may be desirable to add a separate resource that
would allow independent control of the strings passed from the
contour plot to the label bar.
  -dave

On Dec 11, 2008, at 10:51 AM, franco.catalano_at_uniroma1.it wrote:

> Hi Adam and ncl users,
>
> Thank you for your suggestion. I have also found an easier
> alternative, setting cnLineLabelFormat.
>
> This parameter controls the precision of line libels as well.
>
>
> Franco
>
>
>
> Adam Phillips <asphilli_at_cgd.ucar.edu>
> 11/12/2008 10:15 MST
>
> Per franco.catalano_at_uniroma1.it
> CC ncl-talk_at_ucar.edu
> CCR
> Oggetto Re: [ncl-talk] label bar precision
>
>
>
> Hi Franco,
>
> There isn't a resource that sets the precision of label bar labels
> (yet), but I've gotten around the issue by setting
> cnExplicitLabelBarLabelsOn = True and passing an array of labels to
> lbLabelStrings:
>
> res_at_cnExplicitLabelBarLabelsOn = True
> res_at_lbLabelStrings = (/"0.0200","0.0201","0.0202"/)
>
> Note that by doing this, you are disassociating the Label Bar labels
> from the actual values of your contour plot. Thus, if you change the
> contour levels of your plot, you will need to change the
> lbLabelStrings
> as well.
>
> Also note that you can do the same thing if you have a colored
> streamline or vector plot by setting vcExplicitLabelBarLabelsOn
> or sfExplicitLabelBarLabelsOn.
>
> http://www.ncl.ucar.edu/Document/Graphics/Resources/
> lb.shtml#lbLabelStrings
> http://www.ncl.ucar.edu/Document/Graphics/Resources/
> cn.shtml#cnExplicitLabelBarLabelsOn
>
> Adam
>
> franco.catalano_at_uniroma1.it wrote:
> > Hi ncl team and users
> > Is there a way to explicitly set the precision of the label bar
> labels.
> > For example, like the tick marks with tmXBPrecision and
> tmYLPrecision.
> > Thank you for your suggestions.
> >
> > Franco
> >
> > ____________________________________________________
> > Eng. Franco Catalano
> > Ph.D. Student
> >
> > D.I.T.S.
> > Department of Hydraulics, Transportation and Roads.
> > Via Eudossiana 18, 00184 Rome
> > Sapienza University of Rome.
> > tel: +390644585218
> >
> >
> >
> ----------------------------------------------------------------------
> --
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> --------------------------------------------------------------
> Adam Phillips asphilli_at_ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> ESSL/CGD/CAS fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 11 2008 - 12:34:40 MST

This archive was generated by hypermail 2.2.0 : Sat Dec 20 2008 - 12:36:21 MST