[ncl-talk] different labels than contour interval
Don Murray (NOAA Affiliate)
don.murray at noaa.gov
Thu Nov 13 10:51:25 MST 2014
Thanks again, Kyle. Using the LabelStrings works (and is easiest). One
note: in later versions of NCL (>= 6.1.0), you need to set
lbLabelAutoStride = False to get this to work (as the docs clearly state).
On 11/13/14 9:46 AM, Kyle Griffin wrote:
> Since the lbLabelValues (not a real resource, but I'll refer to the
> concept of that anyway) is controlled by the contour plot it's
> associated with, you'd have to forcibly change the plot. You also have
> the option of creating your own label bar from scratch and attaching it,
> but that's even more of a hassle than the explicit strings with the
> trade off of being able to control every aspect of the label bar without
> affecting the plot.
>
> https://www.ncl.ucar.edu/Applications/labelbar.shtml
>
> Example 5 is essentially the level of control we're taking with editing
> some of the parameters in general, but Example 10 would be a completely
> independent label bar. Example 12's positioning advice would also be
> relevant should you decide to go down that route.
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu <mailto:ksgriffin2 at wisc.edu>
>
> On Thu, Nov 13, 2014 at 10:31 AM, Don Murray (NOAA Affiliate)
> <don.murray at noaa.gov <mailto:don.murray at noaa.gov>> wrote:
>
> Thanks, Kyle. I tried the stride, but it doesn't allow you to set
> the start/end points.
>
> And, I was hoping to avoid the explicit lbLabelStrings, but maybe
> that's the best solution. It would be nice if there was a
> lbLabelValues attribute to go along with lbLabelStrings, like there
> is for the tick marks.
>
> Don
>
> On 11/13/14 9:25 AM, Kyle Griffin wrote:
>
> Hi Don,
>
> You can explore the controls over the label bar labels
> (lbLabelxxxxx) at:
>
> https://www.ncl.ucar.edu/__Document/Graphics/Resources/__lb.shtml#lbLabelAlignment
> <https://www.ncl.ucar.edu/Document/Graphics/Resources/lb.shtml#lbLabelAlignment>
>
> lbLabelStride = 5 would work to give you only every 5 on the
> color bar.
>
> A bit more time consuming would be to explicitly set the
> lbLabelStrings
> =
> (/"","","","","10","","","",""__,"","","","","","","20",......__./)
> which
> should also get the job done - you might also need to set
> lbLabelStride
> = 1 to make sure the strings apply to the correct labels.
>
>
>
> ------------------------------__----------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu <mailto:ksgriffin2 at wisc.edu>
> <mailto:ksgriffin2 at wisc.edu <mailto:ksgriffin2 at wisc.edu>>
>
> On Thu, Nov 13, 2014 at 10:02 AM, Don Murray (NOAA Affiliate)
> <don.murray at noaa.gov <mailto:don.murray at noaa.gov>
> <mailto:don.murray at noaa.gov <mailto:don.murray at noaa.gov>>> wrote:
>
> Hi-
>
> I've read through the label bar examples, but I'm not
> finding the
> answer, so I'll ask here.
>
> I have a dataset that I'm drawing with filled contours,
> defined as:
>
> res at cnLevelSelectionMode = "ManualLevels"
> res at cnMinLevelValF = 5.
> res at cnMaxLevelValF = 65.
> res at cnLevelSpacingF = 1
>
> over a colormap with 241 values.
>
> For the label bar, I'd like to just have labels every 10 units
> (10,20,30,40,50,60), but I'm not sure how to set the label
> values.
>
> I'm sure I'm missing something simple, but help is appreciated.
>
> Thanks.
>
> Don
> --
> Don Murray
> NOAA/ESRL/PSD and CU-CIRES
> 303-497-3596 <tel:303-497-3596> <tel:303-497-3596
> <tel:303-497-3596>>
> http://www.esrl.noaa.gov/psd/__people/don.murray/
> <http://www.esrl.noaa.gov/psd/people/don.murray/>
> _________________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/__mailman/listinfo/ncl-talk
> <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
> --
> Don Murray
> NOAA/ESRL/PSD and CU-CIRES
> 303-497-3596 <tel:303-497-3596>
> http://www.esrl.noaa.gov/psd/__people/don.murray/
> <http://www.esrl.noaa.gov/psd/people/don.murray/>
>
>
--
Don Murray
NOAA/ESRL/PSD and CU-CIRES
303-497-3596
http://www.esrl.noaa.gov/psd/people/don.murray/
More information about the ncl-talk
mailing list