[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to draw a curved arrow?



This kind of thing is what programs like Illustrator and Freehand were designed for! They will do overlay drawings of all kinds much more nicely, and much more flexibly, than anything Ferret (or any other analysis package) will ever be able to. Ferret is great for reading/analyzing/plotting data, but it is not, and is not intended to be, an all-purpose drawing tool. You could use Ferret's label command to write a paper line by line, but no one would suggest that it should replace Word/OpenOffice/Latex.

Billy K (aka Mr Curmudgeon)

On Nov 29, 2005, at 9:27 AM, Ansley Manke wrote:

Hello again,
We had one more thought, which is just another way of doing what I
described yesterday. The polymark.jnl script takes pre-defined polygon
shapes and overlays them on a plot using the polygon command. It has a
scale parameter that would let you change the size of the polygons.
polymark.jnl calls a second script called polyshape.jnl. You could
modify this script, adding the definition of your curved arrow shape.
You could also modify polymark.jnl to add a new argument which would be
an angle of rotation for the arrow shape.

To locate these scripts, use the Unix command Fgo,


Fgo polymark
Fgo polyshape

If you come up with a solution you like, we encourage you to submit it
back to the Users Group as a contributed script.

Ansley

Ansley Manke wrote:


Hi Xia,
There is not a direct way to do this in Ferret. You would need to define
the outlines of the arrows you want and draw them as filled polygons.
The idea is like the one used in this example which defines a triangular
polygon and then places it in several locations on the plot where the
locations are set by XPTS and YPTS

*yes? LET xtriangle = YSEQUENCE({-1,0,1})
yes? LET ytriangle = YSEQUENCE({-1,1,-1})
yes? LET xpts = {152,188,142}
yes? LET ypts = {33,37,22}
yes? GO basemap x=100:200 y=0:50 20
yes? POLYGON/OVER xtriangle+xpts, ytriangle+ypts
*

Defining the curved arrows that you wish to use would be tedious but
once you have the shape you want you can reuse it. You can specify a
color palette on the POLYGON command to choose the color or colors you
want. The variables xtriangle and ytriangle (or your variables defining
the polygon shape) could be multiplied by a scale factor, or separate
scale factors for X and Y, to make the polygons the desired size. For
example, compare this polygon command:
*
yes? POLYGON/OVER/PALETTE=red 3*xtriangle+xpts, 2*ytriangle+ypts*

Ansley

Xia Changshui wrote:




Dear colleagues,
As a new hand using Ferret, I have a question. I want to draw a curved arrow over a current filed to indicate the circulation is clockwise or anti-clockwise. Just like the blue curved arrow in the figure in the attached pdf file. How to achieve this? Can a simple command work?
Thank you in advance.
Xia Changshui
2005-11-25










[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement