[ncl-talk] Placing numbers above the bars
Rick Brownrigg
brownrig at ucar.edu
Sun Feb 17 09:16:06 MST 2019
Hi Barry,
You might be able to use "datatondc()" to get the NDC coordinates of the
tops of the bars, and then use gsn_text_ndc() to draw your annotation
(applying a small offset in x and/or y direction to properly position it).
The example on the datatondc() does something similar, but with markers
rather than text.
http://ncl.ucar.edu/Document/Functions/Built-in/datatondc.shtml
http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text_ndc.shtml
Hope that helps...
Rick
On Sat, Feb 16, 2019 at 11:05 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hello:
>
> I have a bar chart attached.
>
> I would like to place a number (I will generate it) above the position of
> the bar highest bar, centered at each labeled (x-axis) interval.
>
> Is there a straightforward way to do this?
>
> Thanks,
>
> Barry
>
> --
> Barry H. Lynn, Ph.D
> Senior Associate Scientist, Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
> _______________________________________________
> 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/20190217/78ca1225/attachment.html>
More information about the ncl-talk
mailing list