Skip to content

Commit

Permalink
Merge pull request #67 from EvolEcolGroup/new_vignette_colour_mess_plot
Browse files Browse the repository at this point in the history
New vignette colour mess plot
  • Loading branch information
dramanica authored Dec 13, 2024
2 parents c12faad + 66d9dd8 commit 833ed2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Suggests:
testthat (>= 3.0.0),
tidyterra,
vdiffr,
xgboost
xgboost,
ggpattern
VignetteBuilder: knitr
Config/testthat/edition: 3
LazyData: true
15 changes: 12 additions & 3 deletions vignettes/a0_tidysdm_overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,20 @@ lacerta_mess_future_subset[lacerta_mess_future_subset < 0] <- 1
# convert into polygon
lacerta_mess_future_subset <- as.polygons(lacerta_mess_future_subset)
library(ggpattern)
# plot as a mask
ggplot() + geom_spatraster(data = prediction_future) +
scale_fill_viridis_b(na.value = "transparent") +
geom_sf(data = lacerta_mess_future_subset,
fill= "lightgray", alpha = 0.5, linewidth = 0.5)
scale_fill_terrain_c() +
geom_sf_pattern(data = lacerta_mess_future_subset,
pattern = "stripe",
fill = "transparent",
pattern_fill= "black",
pattern_density = 0.02,
pattern_spacing = 0.05,
pattern_angle = 45,
alpha = 0.1,
linewidth = 0.5)
```

Expand Down

0 comments on commit 833ed2c

Please sign in to comment.