[ncl-talk] How to draw a vector in a plot

Adam Phillips asphilli at ucar.edu
Wed May 10 14:12:47 MDT 2017


Hello,
I see three possibilities:
1) Change to say Font Table 18 and draw a character using gsn_text (or some
other NCL gsn*text function).
2) Create 2 empty arrays (with the exception of one point) that contain the
u and v information of your proposed arrow, and use gsn_csm_vector to
create the single vector.
3) Use Illustrator or some other external package to add the arrow.

Option 2 seems like it would involve too much work. I have attached a
script that shows how to do option #1. I started off with the first example
on the Color Fill Applications page here:
http://www.ncl.ucar.edu/Applications/color.shtml#ex1
and modified it to add a single vector, using the Font Table #18:
http://www.ncl.ucar.edu/Document/Graphics/Images/font18.png
and the arrow drawn by specifying the "o" character. Note that you will
need to play a bit with the txres resources to get the angle, size, and
thickness of the arrow to where you want it:
https://www.ncl.ucar.edu/Document/Graphics/Resources/tx.shtml

Hope that helps. If you have any further questions please respond to the
ncl-talk email list.
Adam







On Tue, May 9, 2017 at 6:48 PM, wen <wenguanhuan at 163.com> wrote:

> Hi all,
>     I am trying to draw a vector over one area, similar with the figure
> bellow. But I have not found the example on the official website.  Is there
> anybody knowing how to draw it? Please tell me. Thank you!
>
>
> --
> 祝好
> 温冠环
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170510/fec7693a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: B~O{(9N~N at 6@4)0ND{`CRGU.jpg
Type: image/jpeg
Size: 46414 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170510/fec7693a/attachment.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: color.png
Type: image/png
Size: 227843 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170510/fec7693a/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: color_1.ncl
Type: text/x-ncl
Size: 1337 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170510/fec7693a/attachment.bin 


More information about the ncl-talk mailing list