Re: [R] ts.plot data labels

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 01 Jul 2005 - 08:18:15 EST

On 6/30/05, Beth Wilmot <wilmotb@ohsu.edu> wrote:
> Dear R users,
> I am trying to put labels on the data points on a ts.plot.
>
> I have tried:
> ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab="group", ylab="level"))
> which plots fine but gives no labels
>
> xy.labels=TRUE
> also plots without labels
>
> I also tried using text() but got an error
>
> Error in xy.coords(x, y, recycle = TRUE) :
> Argument "x" is missing, with no default

Try using text. See ?ts.plot and ?text for more info:

ts.plot(ts(1:26), type = "p", gpars = list(pch = 20)) # points text(1:26, 1:26, letters, offset = 0.2, cex = .5, pos = 1) # letters below points



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 01 08:21:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:08 EST