Thanks to Jim and Greg,

Concerning the colors of the arrows, color.scale() function from Jim's solution 
seems more
straigthforward to me. I'm trying now to include a proper legend with 
color.legend() function.

Héctor

On 20 Jan 2009 at 22:13, Jim Lemon wrote:


> Héctor Villalobos wrote:
> > Dear list,
> >
> > I would like to plot arrows with different colors according to arrow
> > length, and also (if possible) with head size proportional to arrow
> > length. The idea is to make a quiver-like plot of matlab with wind
> > speed data.
> >
> > So far, I´ve been able to use different colors, but I need to find a
> > more efficient way to recode arrow length intervals into colors. On
> > the contrary, I can't define different head sizes, because the
> > "length" argument in the "arrows()" function seems to control the
> > head size of all the arrows at once.
> >
> Hi Hector,
> The color.scale function in the plotrix package may do what you want,
> also have a look at the vectorField function. I think you will have to
> draw the arrows one at a time or rewrite the arrows function to get
> different head sizes.
>
> Jim
>
>


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to