- # Dummy data used for the plot
- x <- runif(25); y <- runif(25)
- # Plot options - I found the default lengths for axis tick too long
- par(mfrow = c(2, 2), tcl = -0.2)
- # Plot (a) - without anything regarding the axis
- plot(x, y, axes = F, xlab = NA, ylab = NA, xlim = c(0, 1), ylim = c(0, 1),
- main = "(a)")
- # Plot (b) - with a box but no ticks
- plot(x, y, axes = F, xlab = NA, ylab = NA, xlim = c(0, 1), ylim = c(0, 1),
- main = "(b)")
- box()
- # Plot (c) - with axes on bottom and left but not ticks
- plot(x, y, axes = F, xlab = NA, ylab = NA, xlim = c(0, 1), ylim = c(0, 1),
- main = "(c)")
- abline(h = par()$usr[1])
- abline(v = par()$usr[3])
- # Plot (d) - with axes on bottom and left and ticks on them
- plot(x, y, axes = F, xlab = NA, ylab = NA, xlim = c(0, 1), ylim = c(0, 1),
- main = "(d)")
- abline(h = par()$usr[1])
- abline(v = par()$usr[3])
- axis(1, at = c(0:10/10), labels = F, tick = T, lwd = 0, lwd.ticks = 1)
- axis(2, at = c(0:10/10), labels = F, tick = T, lwd = 0, lwd.ticks = 1)
Hoepfully one of the four plots could be what you want.


雷达卡






京公网安备 11010802022788号







