Re: [R] adding year information to a scatter plot

2010-05-02 Thread Rubén Roa
> -Mensaje original- > De: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] En nombre de Ozan Bakis > Enviado el: domingo, 02 de mayo de 2010 21:25 > Para: r-help@r-project.org > Asunto: [R] adding year information to a scatter plot > > Hi R

Re: [R] adding year information to a scatter plot

2010-05-02 Thread Muhammad Rahiz
Hi Ozan, The {calibrate} package allows you to do that. install.packages("calibrate") library(calibrate) df=data.frame(year=c(2001,2002,2003),a=c(8,9,7),b=c(100,90,95)) df plot(b~a,data=df) textxy(df$a,df$b,df$year) Muhammad On 05/02/2010 08:25 PM, Ozan Bakis wrote: Hi R users, I would lik

Re: [R] adding year information to a scatter plot

2010-05-02 Thread John Kane
) p <- ggplot(df, aes(x=a, y=b, label=year)) p + geom_text() --- On Sun, 5/2/10, Ozan Bakis wrote: > From: Ozan Bakis > Subject: [R] adding year information to a scatter plot > To: r-help@r-project.org > Received: Sunday, May 2, 2010, 3:25 PM > Hi R users, > >

[R] adding year information to a scatter plot

2010-05-02 Thread Ozan Bakis
Hi R users, I would like to add year information to each point in a scatter plot. The following example shows what i mean: df=data.frame(year=c(2001,2002,2003),a=c(8,9,7),b=c(100,90,95)) df plot(b~a,data=df) Now, I would like to see which point belongs to 2001, 2002 and 2003 in the above graphic