0

I am trying to plot point data on top of a DEM. I want to plot the point data like 3D bars which should lay on top of the DEM, but they just become merged together.

The code I am using:

DEM <- raster("NRW_dem.tif")
dem <- as.data.frame(DEM, xy=TRUE)

points <- read_sf("NRW_growing_stock_points.shp")

g <- ggplot()+
  geom_raster(data = dem, aes(x=x, y=y, fill=NRW_dem))+
  geom_point(data=points, aes(x = longitude, y = latitude, color=volume_per,fill=NULL))
g

plot_gg(g, height=5, width=8, 
        offset_edges = FALSE, multicore = TRUE, scale = 50)

If I plot them separately both graphs look fine, but merging them is a problem. Anyone has an idea how to overcome this issue?

enter image description here

starski
  • 141
  • 6

0 Answers0