[ncl-talk] Adding labels to markers
Adam Phillips
asphilli at ucar.edu
Fri Aug 16 12:35:21 MDT 2024
Hi Barry,
Thanks as always for sending an easy-to-run script. I put in a bunch of
print statements, and it looks like your script fails on the 2nd call
to tdprpt within the do loop. The values being passed to tdprpt are:
(0) 0.5616955
(1) 0.4153071
(2) 0.06611873
and then the script core dumps. I unfortunately have zero experience using
the tdprpt function and/or creating 3D graphics, so this is just an
educated guess: I am guessing that those 3 values printed above are outside
the range of valid coordinates. Beyond that general statement, I do not
believe I can help any further.
One other thing I noticed: You need to pass a resource list in as the last
argument in gsn_text_ndc, as opposed to just passing a scalar. So something
like this:
tres = True
tres at txFontHeightF = 0.02
gsn_text_ndc(wks, tostring(letters(i)), xy_proj(0), xy_proj(1), tres)
Best,
Adam
On Fri, Aug 16, 2024 at 5:35 AM Barry Lynn via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Hello:
>
> I've been working on creating a 3 dimensional plot.
>
> It works fine (you can run it yourself), so far, but when I try to add
> letters to the Markers I can't get it to run.
>
> ChatGTP is stumped!
>
> Does someone have a suggestion?
>
> The line that doesn't work (or some permutation of it)
> is: gsn_text_ndc(wks, tostring(letters(i)), xy_proj(0), xy_proj(1),
> font_height)
>
> Thank you,
>
> Barry
>
> --
>
> Barry H. Lynn, Ph.D
> Senior Scientist, Lecturer,
> The Institute of Earth Sciences,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> Weather It Is, LTD
> Weather and Climate Focus
> https://weather-it-is.com <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 mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
--
Adam Phillips
Associate Scientist IV, Climate Analysis Section
Climate and Global Dynamics Laboratory
National Center for Atmospheric Research
www.cgd.ucar.edu/staff/asphilli/
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20240816/60eb2ca5/attachment.htm>
More information about the ncl-talk
mailing list