I am trying to plot 2 raster files but when I am using the
plot_tiltedmaps function the plot is empty. I am following the steps in the 2nd tutorial, called More advanced example. Any ideas why is that?
Here is the code:
# install.packages("remotes") remotes::install_github("marcosci/layer") library(layer) library(terra) wd <- "path/" pop = rast(paste0(wd, "pop.tif")) agbh = rast(paste0(wd, "agbh.tif")) pop <- tilt_map(pop, y_tilt = 3, x_shift = 25, y_shift = 50, parallel = TRUE) agbh <- tilt_map(agbh, y_tilt = 3, x_shift = 50, y_shift = 100, parallel = TRUE) map_list <- list(pop, agbh) plot_tiltedmaps(map_list, palette = c("tofino", "rocket"), direction = c(-1, 1))
You can download the data from here.