Re: [R] ggplot2 graphing multiple lines of data

2009-09-14 Thread John Kane
Thanks to both of you.  
I knew it was something stupid.  I just didn't realise it was that stupid. 


--- On Mon, 9/14/09, baptiste auguie  wrote:

> From: baptiste auguie 
> Subject: Re: [R] ggplot2 graphing multiple lines of data
> To: "R R-help" 
> Received: Monday, September 14, 2009, 11:34 AM
> alternatively, use aes_string,
> 
> p  <- ggplot(bmm, aes_string(x="age", y="bm",
> colour="pp", group="pp"))
> p <- p + geom_line()
> p
> 
> HTH,
> 
> baptiste
> 
> 2009/9/14 smu 
> 
> > hey,
> >
> > On Mon, Sep 14, 2009 at 07:51:42AM -0700, John Kane
> wrote:
> > > p  <- ggplot(bmm, aes(x="age", y="bm",
> colour="pp", group="pp"))
> > > p <- p + geom_line()
> >
> > remove the quotes and it will work:
> >
> > ggplot(bmm, aes(x=age, y=bm, colour=pp,
> group=pp))+geom_line()
> >
> > regards,
> >  Stefan
> >
> > __
> > R-help@r-project.org
> mailing list
> > 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.
> >
> 
> 
> 
> -- 
> _
> 
> Baptiste Auguié
> 
> School of Physics
> University of Exeter
> Stocker Road,
> Exeter, Devon,
> EX4 4QL, UK
> 
> http://newton.ex.ac.uk/research/emag
> __
> 
>     [[alternative HTML version deleted]]
> 
> 
> -Inline Attachment Follows-
> 
> __
> R-help@r-project.org
> mailing list
> 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.
> 


  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

__
R-help@r-project.org mailing list
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.


Re: [R] ggplot2 graphing multiple lines of data

2009-09-14 Thread baptiste auguie
alternatively, use aes_string,

p  <- ggplot(bmm, aes_string(x="age", y="bm", colour="pp", group="pp"))
p <- p + geom_line()
p

HTH,

baptiste

2009/9/14 smu 

> hey,
>
> On Mon, Sep 14, 2009 at 07:51:42AM -0700, John Kane wrote:
> > p  <- ggplot(bmm, aes(x="age", y="bm", colour="pp", group="pp"))
> > p <- p + geom_line()
>
> remove the quotes and it will work:
>
> ggplot(bmm, aes(x=age, y=bm, colour=pp, group=pp))+geom_line()
>
> regards,
>  Stefan
>
> __
> R-help@r-project.org mailing list
> 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.
>



-- 
_

Baptiste Auguié

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

http://newton.ex.ac.uk/research/emag
__

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] ggplot2 graphing multiple lines of data

2009-09-14 Thread smu
hey,

On Mon, Sep 14, 2009 at 07:51:42AM -0700, John Kane wrote:
> p  <- ggplot(bmm, aes(x="age", y="bm", colour="pp", group="pp")) 
> p <- p + geom_line()

remove the quotes and it will work:

ggplot(bmm, aes(x=age, y=bm, colour=pp, group=pp))+geom_line()

regards,
 Stefan

__
R-help@r-project.org mailing list
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.