[R] legend for vectorplot in rasterVis
Adrienne Wootten
amwootte at ncsu.edu
Tue Mar 1 15:18:42 CET 2016
All,
Thanks anyway folks, but I'm going to call myself a bonehead and move on
now that I've found it. The key.arrow argument in vectorplot will do what
I need to make a scale legend. Thanks all!
Adrienne
On Tue, Mar 1, 2016 at 9:14 AM, Adrienne Wootten <amwootte at ncsu.edu> wrote:
> Jim,
>
> Thanks! Interestingly when working with lengthKey it gives me an error
> that plot.new hasn't been called after the plot has been created with
> vectorplot. Really bizarre to me.
>
> A
>
> On Tue, Mar 1, 2016 at 5:22 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
>
>> 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.
>>
>> Jim
>>
>>
>> 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.
>>
>
>
>
> --
> 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
>
--
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]]
More information about the R-help
mailing list