| logticks | R Documentation | 
Add proper logarithm ticks to a plot axis.
logticks(
  ax = 1,
  n.minor = 9,
  t.lims,
  t.ratio = 0.5,
  major.ticks = NULL,
  base = c("ten", "ln", "two"),
  ticks.only = FALSE,
  ...
)
log_ticks(...)
log2_ticks(...)
log10_ticks(...)
| ax | numeric; the axis number to add tick-marks to | 
| n.minor | numeric; the number of minor ticks to display | 
| t.lims | numeric; the upper and lower tick limits (in log space) | 
| t.ratio | numeric; the ratio of minor to major tick lengths. | 
| major.ticks | numeric; the axis limits. | 
| base | numeric; the base of the logarithm (somewhat experimental) | 
| ticks.only | logical; on the axis | 
| ... | additional parameters passed to the  | 
This uses pretty with n==5, and assumes 
that the data along the axis ax has 
already been transformed into its logarithm.
Only integer exponents are labeled.
The functions 
log_ticks,
log2_ticks, and
log10_ticks are wrapper functions.
Set the axt parameter (e.g. xaxt) to 'n' 
in the original plot command to prevent adding default tick marks.
A. J. Barbour <andy.barbour@gmail.com>
This was modified from a post on StackOverflow: https://stackoverflow.com/questions/6955440/displaying-minor-logarithmic-ticks-in-x-axis-in-r
Other PlotUtilities: 
wrsp-methods
x <- 10^(0:8)
y <- 1:9
plot(log10(x),y,xaxt="n",xlab="x",xlim=c(0,9))
logticks()
logticks(ax=3, ticks.only=TRUE)
par(tcl=0.5) # have tick marks show up on inside instead
plot(log10(x),y,xaxt="n",xlab="x",xlim=c(0,9))
logticks()
logticks(ax=3, ticks.only=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.