[R] legend for vectorplot in rasterVis

Jim Lemon drjimlemon at gmail.com
Tue Mar 1 11:22:01 CET 2016

Hi Adrienne,
I'm not sure if this will help, but lengthKey in the plotrix package
will display a scale showing the relationship of vector length to
whatever numeric value is being displayed. However, you do have to
sort of the scaling manually.


On Tue, Mar 1, 2016 at 7:30 AM, Adrienne Wootten <amwootte at ncsu.edu> wrote:
> All,
> Your help with this is greatly appreciated!
> I'm working with the vectorplot function in rasterVis to produce wind
> vector maps (pretty much like the code in here -
> https://rpubs.com/alobo/vectorplot), but I was wondering about a legend.
> The vectors that vectorplot produces are wonderful.  What I'm trying to do
> is get a scale legend to go with it.  In other words, have a vector outside
> the main plot which provides a point of reference for the vectors in the
> plot.  Something alike to what GrADS does (for those familiar), is what I'm
> hoping to get to (for an example, the first chart on this page
> http://www.wishingwork.com/grads/graphics-controls/vector-graphics.html)
> I haven't seen this done yet with R, at least not from what I could find
> with all the forums.  If anyone has an idea on how to do this, I
> tremendously appreciate it!
> Thanks all!
> Adrienne
> --
> Adrienne Wootten
> Ph.D Candidate / Graduate Research Assistant
> State Climate Office of North Carolina
> Department of Marine, Earth and Atmospheric Sciences
> North Carolina State University
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

More information about the R-help mailing list