PrettyTicks function

Calculates loose axis ticks and labels using nice numbers

Calculates loose axis ticks and labels using nice numbers

Calculates axis ticks and labels using nice numbers

PrettyTicks(min = -3, max = 3, ntick = 5)

Arguments

  • min: Minimum value on the axis
  • max: maximum value on the axis.
  • ntick: Approximated number of desired ticks

Details

Calculates axis ticks and labels using nice numbers. The resulting labels are known as loose labels.

Returns

A list with the following fields - ticks: Ticks for the axis

  • labels: The corresponding labels

References

Heckbert, P. S. (1990). Nice numbers for graph labels. In Graphics Gems (pp. 61-63). Academic Press Professional, Inc..

Author(s)

Jose Luis Vicente Villardon

See Also

NiceNumber

Examples

PrettyTicks(-4, 4, 5)
  • Maintainer: Jose Luis Vicente Villardon
  • License: GPL (>= 2)
  • Last published: 2023-11-21

Useful links