Reputation: 107
I'm trying a plot where I have small ticks on the X-axis. So instead of these long vertical lines I just want them on the X-axis like the example. Is there a function for this in R?
Example code:
x <- cos(seq(0,20,0.1))+rnorm(201,mean=0,sd=0.5)
lines <- seq(1,201,10)
plot(x)
abline(v=lines)
Upvotes: 0
Views: 321
Reputation: 31452
You are looking for rug
x <- cos(seq(0,20,0.1))+rnorm(201,mean=0,sd=0.5)
lines <- seq(1,201,10)
plot(x)
rug(lines)
Upvotes: 1