On Nov 29, 9:26 pm, Dennis Murphy <
djmu...@gmail.com> wrote:
> Hi:
>
> Ancient ggplot2 secret:
>
> stuff=data.frame(time = factor(time),means)
> ggplot()+geom_line(data=stuff,aes(time,means, group = 1))
>
> The group = 1 snippet is the magic code you need to plot a line between
> numeric y's when the x-values are factor levels.
>
> HTH,
> Dennis
>
> On Mon, Nov 29, 2010 at 2:19 PM, Jahan <
jahan.mohiud...@gmail.com> wrote:
> > Hi,
> > I am trying to plot the means of some time point measurements I have
> > made, but the output is just a blank grid.
>
> > time=c('p4','p7','p14','p22','p28','p35','p50')
> > means=c(0.638,0.786,1.292,0.220,0.450,0.570,0.438)
> > stuff=data.frame(time,means)
> > ggplot()+geom_line(data=stuff,aes(time,means))
>
> > Hopefully you will see the problem I am having. I suspect it might
> > have something to do with the fact that my x values are strings, but I
> > don't know a solution to that. Thanks in advance for your help.
>
> > --
> > You received this message because you are subscribed to the ggplot2 mailing
> > list.
> > Please provide a reproducible example:
http://gist.github.com/270442
>
> > To post: email
ggp...@googlegroups.com