| scaleline {addScales} | R Documentation |
Extract scaleline list from scaledTrellis object
Description
Extracts the scaleline list from an object inheriting from class scaledTrellis. This is useful if the user wants to create their own legend rather than using that generated by addScales.
Usage
scaleline(obj, ...)
## S3 method for class 'scaledTrellis'
scaleline(obj, ...)
Arguments
obj |
|
... |
Possible further arguments for future methods. Ignored at present. |
Details
Extracts the scaleline list from a scaledTrellis object. Note that the actual calculated values are returned, not the rounded/formatted values that would be shown in the legend.
Value
A list with components:
- h
numeric: distance between horizontal scalelines and midline
- v
numeric: distance between vertical scalelines and midline
Author(s)
Bert Gunter bgunter.4567@gmail.com
See Also
Examples
set.seed(8763)
simp <- xyplot(rnorm(10) ~ runif(10))
## Plot it
simp
## Add horizontal and vertical scale lines
ad <-addScales(simp,
scaleline = TRUE,,
ndig.midline = 1 ## only 1 digit will be shown
)
## Plot it
ad
## But here are the actual values
## (shown to default number of digits given
## by "digits" argument of print.default)
scaleline(ad)
## cleanup
rm(simp, ad)
[Package addScales version 1.0-1 Index]