plscale {plgraphics} | R Documentation |
Generate Plscaled Plotting Scale
Description
Generates plscaled values and appropriate tick mark positions and labels for expressing a variable on a plscaled scale, e.g., on log scale
Usage
plscale(x, plscale = "log10", ticksat = NULL, logscale = NULL,
valuesonly = FALSE, ploptions = NULL)
Arguments
x |
data to be used in plotting |
plscale |
name of the function defining the plscaled scale |
ticksat |
tick locations, If |
logscale |
if |
valuesonly |
logical: should only the transformed values be returned? Otherwise, axis ranges and tick information is also calculated. |
ploptions |
See |
Value
The x
data is returned, augmented by the following attributes:
- numvalues
the plscaled values to be used for plotting
- ticksat
the location of tick marks (plscaled values)
- ticklabels
the labels for the tick marks showing the original scale
- plscale
the name of the function used for the plscaleation
Note
Besides the logarithmic plscale that is supported by core R graphics, any other plscaleation may be used, notably the so-called "first aid plscaleations".
Author(s)
Werner A. Stahel
See Also
Examples
x <- 10^seq(-1,3,0.5)
plscale(x)
xx <- plscale(x, plscale="sqrt")
plyx(xx)
x <- seq(0,100,2)
plyx(plscale(x, plscale="asinp"), type="l")