plscale: Generate Plscaled Plotting Scale

plscaleR 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 NULL, these locations will be generated by the function. An attribute attr(..., "ticklabels") may also be given.

logscale

if NULL, R's function axTicks will be called if the plscale is a log function.

valuesonly

logical: should only the transformed values be returned? Otherwise, axis ranges and tick information is also calculated.

ploptions

See ploptions

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

axTicks, prettyscale

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") 

plgraphics documentation built on Oct. 19, 2023, 3 p.m.