Re: how to draw a different label bar

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 29 2011 - 14:43:45 MDT


As I mentioned earlier, this kind of thing is not automatic for NCL,
and isn't trivial. In order to get the triangles, you first have to
get rid of the current end boxes, and then draw over them will filled

Part of the problem is that it isn't trivial to get the NDC
coordinates of the individual boxes. You have to set lbBoxExtent to
1.0 in order to force the vpWidthF/vpHeightF resources to apply to the
labelbar boxes only, and not the labels around the boxes.

I've created an "lb_16.ncl" example to demonstrate this at:

This will only work with labelbars created by gsn_create_labelbar.
This is not a good method to use for labelbars created with the plot,
because the plot will not be panelable later.

You can use gsn_create_labelbar with a contour plot, but you need to
make sure to set lbLabelBarOn to False so that the automatic one isn't
created for you.

We hope to come up with a more elegant solution that only requires
setting some resource value, but this is not very high on our priority
list right now.


On Aug 28, 2011, at 11:19 PM, 蜜严 wrote:

> Hi,
> I thought there to be other resources for the shape of the label bar
> instead of the default one, but I failed to find one. How can I draw
> the label bar like the attached one, i.e., triangle instead of
> quadrangle at the two sides?
> Thanks in advance.
> Mi
> <label bar.jpg>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Aug 29 14:44:02 2011

This archive was generated by hypermail 2.1.8 : Mon Aug 29 2011 - 21:44:22 MDT