layer
layer copied to clipboard
tilt_maps: added angle_rotate parameter
Hi,
Here is a suggestion to include a parameter called angle_rotate
to allow control over the rotation of the input maps in tilt_maps
. This might allow total control over the map created by the function, since it is then possible to stretch, tilt, rotaten and shift it -- what currently is not possible.
Obviously, we can change the name of this parameter if there is a better suited name.
Just to exemplify the utility of adding that, now it is possible to make the kind of plot shown below, which might also be interesting for the users of layer
:
# plot maps with no tilting or rotation
library(layer)
tilt_landscape_1 <- tilt_map(landscape_1,
x_stretch = 1, y_stretch = 0,
x_tilt = 0, y_tilt = 1,
angle_rotate = 0)
tilt_landscape_2 <- tilt_map(landscape_2,
x_stretch = 1, y_stretch = 0,
x_tilt = 0, y_tilt = 1,
x_shift = 10, y_shift = -10,
angle_rotate = 0)
tilt_landscape_3 <- tilt_map(landscape_3,
x_stretch = 1, y_stretch = 0,
x_tilt = 0, y_tilt = 1,
x_shift = 20, y_shift = -20,
angle_rotate = 0)
tilt_landscape_points <- tilt_map(landscape_points,
x_stretch = 1, y_stretch = 0,
x_tilt = 0, y_tilt = 1,
x_shift = 30, y_shift = -30,
angle_rotate = 0)
map_list <- list(tilt_landscape_1, tilt_landscape_2, tilt_landscape_3, tilt_landscape_points)
plot_tiltedmaps(map_list,
layer = c("value", "value", "value", NA),
palette = c("bilbao", "mako", "rocket", NA),
color = "grey40")
Created on 2022-10-06 by the reprex package (v2.0.1)