Reputation: 41
Hello how to change size axis plot in R
plot(c(imf[1,]), ylim=c(-100, 100),type="l", col="blue")
I want axis is sequence 1:36, not (0, 5, 10, 20, 25, 30, 35) but (1,2,3,4,5,6,7,.....36)
Upvotes: 1
Views: 3533
Reputation: 16277
Suppress the x-axis with xaxt = "n"
and add it back with your own axis
.
plot(runif(36), type="l",col="blue", xaxt = "n", cex.axis=0.7)
axis(1, at=1:36, labels=1:36,cex.axis=0.7)
Upvotes: 0
Reputation: 121568
You should axis
. But it is optimized to not overlap overlap previously drawn labels, so here I am playing with cex
parameter (depends on you window size) to show all labels.
plot(1:36, rnorm(36), axes = FALSE)
axis(1, 1:36, 1:36,cex.axis=0.5)
Upvotes: 1