Logarithmic y-axis Tick Marks in R plot() or ggplot2()
问题 I saw the ideal tick-mark structure for a log="y" plot in this paper, Figure 3b 3c 3d. It has short, log-spaced minor tick marks without labels, plus long, log-spaced major tick marks with labels. Does anyone know how to achieve this in R ? 回答1: In base R just build the axes however you want. Something like this could be a start. set.seed(5) d <- data.frame(x=1:100, y=rlnorm(100, meanlog=5, sdlog=3)) with(d, { plot(x, y, log="y", yaxt="n") y1 <- floor(log10(range(y))) pow <- seq(y1[1], y1[2]