Description Usage Arguments Details Author(s) References See Also Examples
Add proper logarithm ticks to a plot axis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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) |
... |
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: http://stackoverflow.com/questions/6955440/displaying-minor-logarithmic-ticks-in-x-axis-in-r
Other PlotUtilities:
wrsp-methods
1 2 3 4 |
Loading required package: kelvin
Loaded kelvin (2.0.0) -- Solutions to the Kelvin differential equation
Loaded kitagawa (2.1.0) -- Spectral response of water wells
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.