How can I create raster plots with the same colour scale in R

后端 未结 6 916
盖世英雄少女心
盖世英雄少女心 2021-01-31 10:36

I\'m creating some maps from raster files using the \"raster\" package in R. I\'d like to create comparison rasters, showing several maps side by side. It\'s important for this

6条回答
  •  半阙折子戏
    2021-01-31 11:14

    Added as an answer in response to @Tomas

    The answer I ended up using is:

    plot( d, col=rev( rainbow( 99, start=0,end=1 ) ), 
        breaks=seq(min(minValue( d )),max(maxValue(d)),length.out=100) ) 
    

提交回复
热议问题