Yes Mac, text function did it. Thanks All for your help. text(dfPlot$Date, dfPlot$RECLTD,dfPlot$Labels, col=642)
On Tue, Sep 17, 2013 at 12:00 AM, MacQueen, Don <macque...@llnl.gov> wrote: > Possibly the text() function. > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 9/15/13 9:43 AM, "Ankur Seth" <ankurset...@gmail.com> wrote: > > >I want to put labels a,b,c,d on the data points > > > >x<-data.frame(c(1,2,3,4),c(1,4,9,16),c("a","b","c","d"), > >as.Date(c("01-10-2013", "02-10-2013","03-10-2013","04-10-2013"), > >"%d-%m-%Y")) > >colnames(x)<-c("x", "sq", "lables","dates") > >y<-subset(x, select=c(dates,x,sq)) > >y<-read.zoo(y) > >plot(y, plot.type="single", xlab="Date", ylab="Price") > > > > > > > > > >On Sun, Sep 15, 2013 at 9:16 PM, jim holtman <jholt...@gmail.com> wrote: > > > >> Read the help file on 'plot' and look at some of the examples to see > >> how to place labels in various places on a plot. This is not > >> difficult if you have read any of the documentation. > >> > >> Jim Holtman > >> Data Munger Guru > >> > >> What is the problem that you are trying to solve? > >> Tell me what you want to do, not how you want to do it. > >> > >> > >> On Sun, Sep 15, 2013 at 11:37 AM, Ankur Seth <ankurset...@gmail.com> > >> wrote: > >> > I need to put labels in plot in R. Can someone please help? The labels > >> are > >> > in the excel file and loaded into "lables" > >> > > >> > library(xlsx) > >> > library(zoo) > >> > > >> > fPTAnalysis<-"Input.xls" > >> > data<-read.xlsx(fPTAnalysis,9) > >> > > >> > lables<-subset(data, select=c(Labels)) > >> > data<-subset(data, select=c(Date,col1, col2 )) > >> > data<-read.zoo(data) > >> > > >> > > >> > > >> > plot(data) > >> > > >> > -- > >> > Regards, > >> > Ankur Seth > >> > > >> > [[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. > >> > > > > > > > >-- > >Regards, > >Ankur Seth > > > > [[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. > > -- Regards, Ankur Seth [[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.