Li, Hua wrote:
Dear R helpers:
Let's say I have some data X,
X <- runif(1000, 1, 10000000000)
pdf('X.pdf', width=100,height=5)
hist(X, breaks=1000)
dev.off()
I find that, on x-axis the coordinates are 0e+00, 2e+09, 4e+09, 6e+09,
8e+09, 1e+10. Only five numbers, which is too sparse in a 100x5 pdf file. I
want the x-axis coordinates to become more dense, e.g. 0e+00, 1e+09, 2e+09,
3e+09,..... 8e+09, 9e+09, 1e+10. What argument (or function) should I revise
to let this happen??
Thanks a lot!!
Best, Hua
You can draw the axes yourself:
hist(X, axes=F)
axis(1, at=pretty(X, n=100))
axis(2)
box()
Duncan Murdoch
______________________________________________
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.