laxis | R Documentation |
Draw minor ticks on a log scale axis.
laxis(
side = 1L,
nticks = 5L,
labels = TRUE,
digits = 0L,
base = 10,
limit = base^3,
simplify = TRUE,
...
)
side |
an integer specifying which side of the plot the axis is to be drawn on: 1=below, 2=left, 3=above, 4=right |
nticks |
number of minor ticks between each pair of major ticks |
labels |
logical; if |
digits, base, limit, simplify |
additional arguments passed to
|
... |
additional graphical parameters passed to |
A list with elements at.major
and at.minor
giving the points
at which tick marks were drawn for the major and minor axes, respectively.
pretty_sci
; axTexpr
; axis
x <- 1:10
y <- function(base) base ^ x
op <- par(mar = c(3,5,3,5), las = 1)
plot(x, log(y(2), 2), ann = FALSE, axes = FALSE)
laxis(2, base = 2, limit = -1)
par(new = TRUE)
plot(x, y(10), log = 'y', axes = FALSE, ann = FALSE)
laxis(4, nticks = 10, tcl = .5, col.axis = 2)
par(new = TRUE)
plot(x, x, log = 'x', axes = FALSE, ann = FALSE, xpd = NA)
laxis(1, nticks = 10, tcl = -1, col.axis = 1, lwd = 2)
abline(v = x)
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.