[ncl-talk] Remove first box in the LabelBar

林勤芳 cflin at cwb.gov.tw
Sun May 29 22:26:51 MDT 2016


Hi Mary,

 

Thanks for your reply. The problem is solved by your suggestion.

 

The test1.png is a contour plot of precipitation. The first box is set as transparent, which will look like background color white in the labelbar. However, there is no white color in the contour plot. That’s why we want to remove the first box and keep all the label values. 

 

After including the following steps, the first box will be removed in test2.png:

1.      Add one more extremely large value in cnLevels and cnFillColors.

2.      Set cnLabelBarEndStyle = “ExcludeOuterBoxes” 

3.      Set the last string of lbLabelStrings as blank.

 

Lillian

 

From: Mary Haley [mailto:haley at ucar.edu] 
Sent: Saturday, May 28, 2016 12:40 AM
To: 林勤芳
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Remoce first box in the LabelBar

 

​Hi Lillian,

 

Is this a labelbar that's part of a contour or vector plot, or just one that you are trying to create from scratch?

 

Generally, if somebody is trying to remove that first box, then my suggestion is to change your contour or vector levels so that first level is not included.  But, I need to know more about what that first box represents.  Is it just a white box that you are effectively using as a way to not draw any colored contours or vectors below a certain level?

 

You might want to check out some of our labelbar examples:

 

http://www.ncl.ucar.edu/Applications/labelbar.shtml

 

In particular, example lb_12.ncl might be useful, or lb_5.ncl, which shows you how to chuck the labelbar that comes with the contour plot, and just create your own.

 

--Mary

 

 

On Wed, May 25, 2016 at 3:11 AM, 林勤芳 <cflin at cwb.gov.tw> wrote:

Hi NCL group,

 

I’m trying to remove the first box in the LabelBar. It seems like the lbBoxFractions function could work. But I didn’t success. Could you help me to check the following scripts?

 

res at lbBoxCount = 3

res at lbBoxSizing = ”Explicitsizing”

res at lbBoxFractions = (/0.0, 0.0, 0.5, 1.0/)

 

Thank you,

 

Lillian


_______________________________________________
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/20160530/e5fe2b36/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.png
Type: image/png
Size: 395251 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160530/e5fe2b36/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.png
Type: image/png
Size: 395719 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160530/e5fe2b36/attachment-0003.png 


More information about the ncl-talk mailing list