Re: Legend - blank box

From: Guilherme Martins <jgmsantos_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 15 2013 - 10:25:57 MDT

Hi Mary,

My file has exact values 1, 2, 3 and 4.

Now, it's work. My problem was choice the incorrect range

Thank you!

Guilherme.

2013/8/15 Mary Haley <haley@ucar.edu>

> Hi Guilherme,
>
> Thanks for providing a script.
>
> There's no way to tell the labelbar to not draw one of the labelbar boxes,
> unfortunately.
>
> If you only want four boxes/colors, then you must set cnLevels to *3*
> values, and then do the appropriate thing to get four labels on your
> labelbar boxes.
>
> You have contour levels (/1,2,3,4/). Are these levels supposed to
> represent exact values, or ranges of values?
>
> Since you have labels "1", "2", "3", "4" at the box centers, this implies
> to me that your levels are supposed to represent exact values.
>
> Since NCL's contouring doesn't allow for exact values, what I suggest is
> to use vaues that *straddle* the exact values you want, so you know you
> have the correct range:
>
> res@cnLevels = (/1.5,2.5,3.5/)
> res@cnFillColors = (/2,10,16,8,14/)
> res@lbLabelAlignment = "BoxCenters" ; label orientation
> res@lbLabelStrings = (/"1","2","3","4"/)
>
>
> Note that I'm setting lbLabelAlignment and lbLabelStrings when I create
> the contour plots, and *not* when I'm creating the panel plots. This is
> because the panel code queries the first contour plot to get the
> information, and reconstructs the labelbar from that.
>
> --Mary
>
>
>
> On Aug 14, 2013, at 6:17 PM, Guilherme Martins wrote:
>
> > Hi users!
> >
> > In my figure in attach, I don't want the first blank box that is in
> legend appear. How can I remove it?
> >
> > In attach is my script.
> >
> > Thanks,
> >
> > Guilherme
> >
> > --
> > Guilherme Martins
> > https://sites.google.com/site/jgmsantos/
> >
> > <fig.ncl><fig.PNG>_______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
*Guilherme Martins*
https://sites.google.com/site/jgmsantos/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 15 10:26:50 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 21 2013 - 13:54:15 MDT