### set plotting parameters
stns <- c('Stn 1', 'Stn 2')
x_coords <- c(-121.735281, -121.750369)
y_coords <- c(36.850377, 36.806667)
shp_fl <- elk_spatial
bounding_elk <- c(-121.8005, 36.7779, -121.6966, 36.8799)
lab_dir <- c('R', 'L')
trnds <- c('inc', 'dec')
### Low zoom and default maptype plot (for CRAN testing, not recommended)
# Lower zoom number gives coarser text and fewer features
(x_low <- res_custom_sk_map(stations = stns, x_loc = x_coords,
sk_result = trnds, y_loc = y_coords,
bbox = bounding_elk, lab_loc = lab_dir,
shp = shp_fl, zoom = 10))
# \donttest{
### Default zoom and maptype plot
x_def <- res_custom_sk_map(stations = stns, x_loc = x_coords,
sk_result = trnds, y_loc = y_coords,
bbox = bounding_elk, lab_loc = lab_dir,
shp = shp_fl)
### Higher zoom number gives more details, but may not be visible
x_14 <- res_custom_sk_map(stations = stns, x_loc = x_coords,
sk_result = trnds, y_loc = y_coords,
bbox = bounding_elk, lab_loc = lab_dir,
shp = shp_fl, zoom = 14)
### Different maptypes may be used. All may not be available.
# Note that zoom and maptype interact, so some experimentation may be
# required.
x_terrain <- res_custom_sk_map(stations = stns, x_loc = x_coords,
sk_result = trnds, y_loc = y_coords,
bbox = bounding_elk, lab_loc = lab_dir,
shp = shp_fl, maptype = 'stamen_terrain')
# }
Run the code above in your browser using DataLab