I encountered an issue with the plot_map() function. I am trying to plot an elevation map of Switzerland. If I remove the NAs, the plot looks fine. However, whenever the area outside the country contains NA values the final plot depicts some weird stripes. If I remember correctly, the same code worked fine a few months ago. Any idea what could cause this? Here's the code:
# Load required packages
library(rayshader)
library(raster)
# Download elevation data
elev <- getData("alt", country = "CHE")
# Plot without NAs
elev %>%
reclassify(rcl = c(NA, NA, 0)) %>%
raster_to_matrix() %>%
sphere_shade(., texture = "imhof1") %>%
plot_map()
# Plot with NAs
elev %>%
raster_to_matrix() %>%
sphere_shade(., texture = "imhof1") %>%
plot_map()
Hello
I encountered an issue with the
plot_map()
function. I am trying to plot an elevation map of Switzerland. If I remove the NAs, the plot looks fine. However, whenever the area outside the country contains NA values the final plot depicts some weird stripes. If I remember correctly, the same code worked fine a few months ago. Any idea what could cause this? Here's the code: