[R] Adjusting coordinates in raster plots
    Jan Sudeikat 
    Jan.Sudeikat at gmx.de
       
    Wed Aug  8 22:54:04 CEST 2012
    
    
  
Dear R-Help,
When plotting a raster object the origin (0,0) is placed in the center.
E.g. using: 
library(raster)
mat = matrix(runif(100),10,10)
r <- raster(ncol=10, nrow=10)
values(r) <- mat
plot(r, main='Raster example',xlab="x",ylab="y") 
Does anyone know how to adjust the coordinate system?
E.g. I would like to have 0,0 at the top left.
My naive approach was to use "axis()" but this has no effect.
Thanks in advance for any advice.
Best regards,
Jan
    
    
More information about the R-help
mailing list