[ncl-talk] any easy way to use gsn_text to add curved text?

Mary Haley haley at ucar.edu
Sun Aug 23 21:40:27 MDT 2015


I think the problem is that you haven't provided enough points in the line
to hold the full text.

I tried using some dummy lat/lon values for the polyline (along with a
dummy wrfout file), and was able to get the text. Here are the dummy values
I used, and the code for drawing the text:

  lat = (/ 30, 31, 32, 35, 37, 40, 41, 42, 43, 44, 45/)
  lon = (/-95,-94,-90,-90,-90,-88,-87,-87,-85,-83,-82/)
  gsres = True
  gsres at gsLineLabelString = "B|a|l|c|o|n|es F|a|u|lt"
  gsn_polyline(wks,plot,lon(1:),lat(1:),gsres)

See the attached image.


--Mary



On Fri, Aug 14, 2015 at 10:01 AM, xiaoming Hu <yuanfangcan at hotmail.com>
wrote:

> Mary
>
> Thanks a lot!
>
> Your template script works on my computer.
>
> But When I create a new script, it doesn't work.
> See
> http://www.caps.ou.edu/micronet/HurricaneImpactonO3/WRFV3.6.1/YSU/wrfNARR3dWSM6_CONUS_UCM_YSU.2011080700/test_curvedtext.000001.png
>
> The line shows up, but the Line Label does not show up.  (I tried both
> version 5.2.1, and 6.1.3)
> See my script:
>
> http://www.caps.ou.edu/micronet/HurricaneImpactonO3/WRFV3.6.1/YSU/wrfNARR3dWSM6_CONUS_UCM_YSU.2011080700/test.ncl
>
> Could you please tell me anything wrong?
>
> Thanks a lot!
> Xiaoming
>
> ------------------------------
> Date: Mon, 10 Aug 2015 14:06:57 -0600
> Subject: Re: [ncl-talk] any easy way to use gsn_text to add curved text?
> From: haley at ucar.edu
> To: yuanfangcan at hotmail.com
> CC: ncl-talk at ucar.edu
>
>
> Hi Xiaoming,
>
> Sorry about the disabling of your membership.  I understand that we are
> having some problems with the "mailmain" software, and it may have disabled
> you based on faulty information. We only unsubscribe people ourselves if
> they starting spamming the group.
>
> Regarding the curved text question, this is doable via the special
> "gsLineLabelString" resource and the use of the "|" character, which helps
> the text follow the curve of the line. Unfortunately, this script does not
> appears to not be working in NCL versions 6.2.0, 6.2,1, or 6.3.0.  I've
> filed a ticket on this, and am hoping I'm missing something obvious. It
> works under version 6.1.2 and earlier.
>
> I've attached the example script and image.  Let me know if this is not
> what you are looking for.  If you have NCL V6.2.x or later and need to use
> this feature, then I'll try to get you a fix once we have one.
>
> --Mary
>
>
>
>
>
> On Mon, Aug 10, 2015 at 11:44 AM, xiaoming Hu <yuanfangcan at hotmail.com>
> wrote:
>
> My membership in the mailing list ncl-talk has been disabled during the past few days.
>
> Did anybody post any suggestion on this problem, i.e., add curved text in
> plot?
> Thanks
> Xiaoming
>
> ------------------------------
> From: yuanfangcan at hotmail.com
> To: ncl-talk at ucar.edu
> Date: Fri, 7 Aug 2015 15:43:30 +0000
> Subject: [ncl-talk] any easy way to use gsn_text to add curved text?
>
>
> Is there any easy way to add curved text like "Balcones Fault Zone" in the
> following figure?
> Thanks a lot!
> Xiaoming
>
>
>
> _______________________________________________ ncl-talk mailing list
> ncl-talk at ucar.edu List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> 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/20150823/c580ae97/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2015-08-07 104128.png
Type: image/png
Size: 340462 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150823/c580ae97/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_curvedtext.png
Type: image/png
Size: 135798 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150823/c580ae97/attachment-0003.png 


More information about the ncl-talk mailing list