Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 23, 2025
1 parent a7dbc42 commit 0fe863e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 72 deletions.
21 changes: 3 additions & 18 deletions R/scales_cross_blended.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,6 @@
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_cross_blended_c(palette = "cold_humid")
#'
#' # Use hypsometric tint version...
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_cross_blended_tint_c(palette = "cold_humid")
#'
#' # ...but not suitable for the range of the raster: adjust
#' my_lims <- minmax(volcano2_rast) %>% as.integer() + c(-2, 2)
#'
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_cross_blended_tint_c(
#' palette = "cold_humid",
#' limits = my_lims
#' )
#'
#' # Full map with true tints
#'
Expand Down Expand Up @@ -149,13 +135,12 @@
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_cross_blended_b(breaks = seq(70, 200, 25), palette = "arid")
#'
#' # With limits and breaks
#' # With breaks
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_cross_blended_tint_b(
#' scale_fill_cross_blended_b(
#' breaks = seq(75, 200, 25),
#' palette = "arid",
#' limits = my_lims
#' palette = "arid"
#' )
#'
#' # With discrete values
Expand Down
21 changes: 3 additions & 18 deletions R/scales_hypso.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,6 @@
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_hypso_c(palette = "colombia_hypso")
#'
#' # Use hypsometric tint version...
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_hypso_tint_c(palette = "colombia_hypso")
#'
#' # ...but not suitable for the range of the raster: adjust
#' my_lims <- minmax(volcano2_rast) %>% as.integer() + c(-2, 2)
#'
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_hypso_tint_c(
#' palette = "colombia_hypso",
#' limits = my_lims
#' )
#'
#' # Full map with true tints
#'
Expand Down Expand Up @@ -134,13 +120,12 @@
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_hypso_b(breaks = seq(70, 200, 25), palette = "wiki-2.0_hypso")
#'
#' # With limits and breaks
#' # With breaks
#' ggplot() +
#' geom_spatraster(data = volcano2_rast) +
#' scale_fill_hypso_tint_b(
#' scale_fill_hypso_b(
#' breaks = seq(75, 200, 25),
#' palette = "wiki-2.0_hypso",
#' limits = my_lims
#' palette = "wiki-2.0_hypso"
#' )
#'
#' # With discrete values
Expand Down
21 changes: 3 additions & 18 deletions man/scale_cross_blended.Rd

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

21 changes: 3 additions & 18 deletions man/scale_hypso.Rd

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

0 comments on commit 0fe863e

Please sign in to comment.