1

Through the following code,

cols <- (heat.colors(255)) plot(raster_sum3, col=cols[round(seq(1,255,length.out=10))], legend=TRUE) # raster of the study area plot(site_3003, add=TRUE) # site boundaries

I plot a raster obtaining the attached imageenter image description here

I want to reverse the legend scale, in order to place lower values above and higher values in the bottom of the scale. Despite several researches, I did not find the appropriate syntax to reach my aim.

  • 1
    Can't easily done with the plot function for a raster. That function has the order of the legend hard coded in. – Spacedman Jun 17 '18 at 21:52

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.