Re: [R] Basic ggplot question

2011-01-10 Thread baptiste auguie
yers, qplot(Date, Close, data=dat,geom="line") + geom_line(aes(Date, vol), colour="red") HTH, baptiste > > > -Original Message- > From: baptiste auguie [mailto:baptiste.aug...@googlemail.com] > Sent: 10 January 2011 18:59 > To: Santosh Srinivas >

Re: [R] Basic ggplot question

2011-01-10 Thread Santosh Srinivas
2011 18:59 To: Santosh Srinivas Cc: r-help@r-project.org Subject: Re: [R] Basic ggplot question Hi, Try this, m = melt(dat, id="Date") head(m) qplot(Date, value, data=m, colour=variable, geom="line") ggplot(m) + facet_grid(variable~., scales="free_y") + geom_path

Re: [R] Basic ggplot question

2011-01-10 Thread baptiste auguie
Hi, Try this, m = melt(dat, id="Date") head(m) qplot(Date, value, data=m, colour=variable, geom="line") ggplot(m) + facet_grid(variable~., scales="free_y") + geom_path(aes(Date, value)) HTH, baptiste On 10 January 2011 14:12, Santosh Srinivas wrote: > Hello R-Group, > > I am trying plott

[R] Basic ggplot question

2011-01-10 Thread Santosh Srinivas
Hello R-Group, I am trying plotting simple time-series with ggplot2 because the output looks better and I've heard its richer in features. I have the following dataset. > dput(dat) structure(list(Date = structure(c(14970, 14971, 14972, 14973, 14974, 14977, 14978, 14979, 14980, 14981), class = "D