Skip to content

Commit

Permalink
Pass args from plot_slope() to plot_dz()
Browse files Browse the repository at this point in the history
For #32
  • Loading branch information
Robinlovelace committed Aug 17, 2021
1 parent d7869d0 commit 9d7bddd
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
17 changes: 16 additions & 1 deletion R/plot_slope.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,22 @@ plot_slope = function(
)
}
dz = distance_z(route_xyz, lonlat = lonlat)
plot_dz(dz$d, dz$z, seq_brks = seq_brks, brks = brks, ...)
plot_dz(
d = dz$d,
z = dz$z,
fill = fill,
horiz = horiz,
pal = pal,
legend_position = legend_position,
col = col,
cex = cex,
bg = bg,
title = title,
brks = brks,
seq_brks = seq_brks,
ncol = ncol,
...
)
}
#' Plot a digital elevation profile based on xyz data
#'
Expand Down
2 changes: 2 additions & 0 deletions R/slope_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#' @examples
#' # Time-consuming examples that require an internet connectioin and API key:
#' \donttest{
#' library(sf)
#' library(raster)
#' routes = cyclestreets_route
#' e = elevation_get(routes)
#' class(e)
Expand Down
2 changes: 1 addition & 1 deletion R/slopes.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ slope_xyz = function(route_xyz, fun = slope_matrix_weighted, lonlat = TRUE) {
#' elevation_extract(m, dem, method = "simple")
#' # Test with terra (requires internet connection):
#' \donttest{
#' if(has_terra()) {
#' if(slopes:::has_terra()) {
#' u = paste0("https://github.com/ITSLeeds/slopes/",
#' "releases/download/0.0.0/dem_lisbon.tif" )
#' if(!file.exists("dem_lisbon.tif")) download.file(u, "dem_lisbon.tif")
Expand Down
2 changes: 1 addition & 1 deletion man/elevation_extract.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/elevation_get.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9d7bddd

Please sign in to comment.