Re: [R] Line Graph greater than 2 variables on plot

2014-08-21 Thread David McPearson
You could also try matplot(data_object[, 1], data_object[, -1], ...) ?matplot Cheers. On Thu, 21 Aug 2014 09:55:29 +1000 "Duncan Mackay" wrote > Hi > > Try something like (as you have not given a reproducible example) > > library(lattice) > > xyplot(y1 + y2+ y3 ... ~ x, data = your data.fram

Re: [R] Line Graph greater than 2 variables on plot

2014-08-20 Thread Duncan Mackay
Hi Try something like (as you have not given a reproducible example) library(lattice) xyplot(y1 + y2+ y3 ... ~ x, data = your data.frame, type = "b", allow.multiple = TRUE) Read ?xyplot CAREFULLY as there are many possibilities you may want to have a look at library(lattice) ?useOuterStrips

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread hadley wickham
On 9/21/07, Jim Porzak <[EMAIL PROTECTED]> wrote: > Hi Hadley, > > I'm trying your suggestion to Wayne. Did you mean to say: > > qplot(D, value, data = melt(wag), colour = variable, geom = "line") > ? Ooops, no I meant to say: qplot(D, value, data = melt(wag, id="D"), colour = variable, geom = "l

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Jim Porzak
Hi Hadley, I'm trying your suggestion to Wayne. Did you mean to say: qplot(D, value, data = melt(wag), colour = variable, geom = "line") ? With the m="D" argument, I get the error: Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class "function" into a data.frame

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread hadley wickham
Or with a little data manipulation, in ggplot2: library(ggplot2) qplot(D, value, data=melt(wag, m="D"), colour=variable, geom="line") Hadley On 9/21/07, Francisco J. Zagmutt <[EMAIL PROTECTED]> wrote: > You can also use the facilities in the lattice package. Using Jim´s > data names: > > requi

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Francisco J. Zagmutt
You can also use the facilities in the lattice package. Using Jim´s data names: require(lattice) xyplot(A+B+C~D, data=wag, type="l", auto.key=list(points = FALSE, lines = TRUE, space = "bottom"), ylab="value", main="Three variable plot") Regards, Francisco Jim Lemon wrote: > Wayne Aldo Gavi

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-21 Thread Jim Lemon
Wayne Aldo Gavioli wrote: > > Hello all, > > I was wondering if anyone knew how to construct a multiple line graph on R, > where there are 2 (or more) sets of data points plotted against some x axis of > data, and you can draw a line on the graph connecting each set of data points. > > For examp

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-20 Thread jim holtman
This should do it for you: > x <- read.table(textConnection("A B C D + 0.65662.11851.23205 + 0.647 2.08651.232510 + 0.65322.10601.228715 + 0.64872.12901.231320 + 0.65

Re: [R] Line Graph - Greater than 2 variables on plot

2007-09-20 Thread Rolf Turner
On 21/09/2007, at 1:57 PM, Wayne Aldo Gavioli wrote: > > > Hello all, > > I was wondering if anyone knew how to construct a multiple line > graph on R, > where there are 2 (or more) sets of data points plotted against > some x axis of > data, and you can draw a line on the graph connecting ea