Saturday, 15 February 2014

R arrowed labelling of data points on a plot -



R arrowed labelling of data points on a plot -

i looking label info points indices -- identify index number visual examination.

so instance,

x<-ts.plot(rnorm(10,0,1)) # visually identify info point indices through arrow labelling

of course, if there's improve way of achieving this, please suggest

you can utilize arrows function:

set.seed(1); ts.plot(x <-rnorm(10,0,1), ylim=c(-1.6,1.6)) # random info arrows(x0=1:length(x), y0=0, y1=x, code=2, col=2, length=.1) # adding arrows text(x=1:10, y=x+.1, 0, labels=round(x,2), cex=0.65) # adding text abline(h=0) # adding horizontal line @ y=0

r plot

No comments:

Post a Comment