View source: R/addMinorTicks.R
| addMinorTicks | R Documentation |
Adds minor axis ticks to a graph.
addMinorTicks(which, current, ticks)
which |
which axis to label, must be one of "bottom," "left," "top," or
"right," "x," or "y." If |
current |
the current plot information, see Details. |
ticks |
the number of minor ticks to draw. If missing, then the default number is used, see Details. |
The current argument must contain a component named yax if
which is "left" or "right" or a component named xax if
which is "bottom" or "top." Those arguments are generally constructed
from functions like linearPretty.
The default placement of minor ticks is at the largest unit that lies between the major ticks—if the difference between major ticks is an even multiple of 2 or 5, then the minor interval will be that even multiple of 1, otherwise it will be 1/10 that even multiple.
The current plot information is returned invisibly.
In general, this should be used only with linear axes. Other axis types can result in unexpected results.
linearPretty, addAxisLabels,
addLabel
## Not run:
set.seed(1)
X <- runif(25, .5, 9.5)
Y <- runif(25)
setGD()
AA.pl <- xyPlot(X, Y)
addMinorTicks("bottom", AA.pl)
addMinorTicks("top", AA.pl)
# For more details of addMinorTicks see
vignette(topic="DateAxisFormats", package="smwrGraphs")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.