plticks: Ticks for plotting

plticksR Documentation

Ticks for plotting

Description

Find ticks locations and labels

Usage

plticks(range, plscale = NULL, transformed = FALSE, nouter = 0,
  tickintervals = NULL, ploptions = NULL)

Arguments

range

range of values that the ticks should cover

plscale

function defining the scale of the axis. Either the name of the function or a function, see Details.

transformed

logical: Is range scaled according to plscale rather than in original scale?

nouter

number of outer ..

tickintervals

approximate number of tick intervals desired. Default is taken from ploptions('tickintervals').

ploptions

pl options

Details

plticks calls pretty for getting tick locations if plscale is not specified and prettyscale if it is. It generates another set for locations of tick labels if tickintervals has 2 elements, such that not all ticks are labelled.

The scaling function plscale can be given by its name if that name is one of log, log10, logst, sqrt, asinp, logit, qnorm. Otherwise, it must be a function with an attribute inverse that defines the inverse function. It should also have an attribute range and an attribute range.transformed if the possible range for its argument or its values are restricted, like asinp that is defined for values between 0 and 100 and has values in the interval from 0 to 1.

Value

A list with components

ticksat

locations of ticks

ticklabelsat

locations of tick labels

ticklabels

tick labels, if plscale is given

Author(s)

Werner A. Stahel

See Also

pretty, prettyscale, plaxis

Examples

plticks(c(23,87))
plticks(c(23,91), plscale="asinp", transformed=FALSE,
  tickintervals=c(10,2))

asinp ## shows the attributes 'inverse', 'range' and 'range.transformed'

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