scaleline: Extract scaleline list from 'scaledTrellis' object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/scaleline.R

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

1
2
3
scaleline(obj, ...)
## S3 method for class 'scaledTrellis'
scaleline(obj, ...)

Arguments

obj

scaledTrellis object

...

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

addScales

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

addScales documentation built on July 1, 2020, 9:25 p.m.