PrettyTicks | R Documentation |
Calculates axis ticks and labels using nice numbers
PrettyTicks(min = -3, max = 3, ntick = 5)
min |
Minimum value on the axis |
max |
maximum value on the axis. |
ntick |
Approximated number of desired ticks |
Calculates axis ticks and labels using nice numbers. The resulting labels are known as loose labels.
A list with the following fields
ticks |
Ticks for the axis |
labels |
The corresponding labels |
Jose Luis Vicente Villardon
Heckbert, P. S. (1990). Nice numbers for graph labels. In Graphics Gems (pp. 61-63). Academic Press Professional, Inc..
NiceNumber
PrettyTicks(-4, 4, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.