Create a ggplot2 layer scaled to a paper and orientation for a location
Source:R/layer_scaled.R
layer_scaled.Rd
Uses layer_neatline, standard_scales, and convert_dist_scale.
Usage
layer_scaled(
data = NULL,
dist = NULL,
diag_ratio = NULL,
unit = NULL,
asp = NULL,
crs = NULL,
scale = NULL,
paper = NULL,
orientation = NULL,
clip = FALSE
)
Arguments
- data
sf
orbbox
class object- dist
distance to convert. If paper is provided, paper width and height are used as dist.
- diag_ratio
ratio of diagonal distance of area's bounding box used as buffer distance. e.g. if the diagonal distance is 3000 meters and the "diag_ratio = 0.1" a 300 meter will be used. Ignored when
dist
is provided.- unit
Units for buffer. Supported options include "meter", "foot", "kilometer", and "mile", "nautical mile" Common abbreviations (e.g. "km" instead of "kilometer") are also supported. Distance in units is converted to units matching GDAL units for x; defaults to "meter"
- asp
Aspect ratio of width to height as a numeric value (e.g. 0.33) or character (e.g. "1:3"). If numeric,
get_asp()
returns the same value without modification.- crs
Coordinate reference system of bounding box to return
- scale
Scale name
- paper
Paper, Default: 'letter'.
- orientation
Orientation "portrait", "landscape", or "square", Default: 'portrait'.
- clip
If
TRUE
, create scaled layer even if the data is cut off; defaults toFALSE
.
See also
Other layer:
layer_frame()
,
layer_icon()
,
layer_location_data()
,
layer_markers()
,
layer_mask()
,
layer_neatline()