0

This is a follow up question to this one: Addressing just the outermost cells in a raster? In this question you can find all the code and the data.

To summarize:

I have a DEM raster masked to the outlines of some glaciers. The raster is cut into three different masks: glacier-adjacent cells (outside the glacier), glacier margin cells (glacier border cells) und inner glacier cells. I used the code provided by @obrl_soil to cut the raster and it worked.

However, when I plot the three results simultaneously, I get this result (see picture below). It seems to me, that every class has a slightly different opinion on what there elevation is. Is this just a plotting error that I overlooked or is there something wrong with the code?

enter image description here

  • 1
    Seems like you have three different rasters with three different ranges of values. You may simply have to set the range of values manually when plotting. – Mikkel Lydholm Rasmussen Jul 4 at 14:07
  • I know its probably a very simple question, but how would I do that? I've looked into adjusting axes with the base plot and found not much. And with ggplot I'm not familiar enough to even plot one raster. – Florian Mlehliv Jul 4 at 14:33
  • 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.