[R] plotting arrows with different colors and varying head size
Jim Lemon
jim at bitwrit.com.au
Tue Jan 20 12:13:34 CET 2009
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
More information about the R-help
mailing list