[R-sig-Geo] rasterVis - Plot subset of data

Thiago V. dos Santos thi_veloso at yahoo.com.br
Sat May 4 23:15:58 CEST 2013


Hello everyone,

Is there any way to plot a geographical subset of a raster using the plot techniques of rasterVis? Here's an example of the rasterVis manual:

## Categorical data
require(raster)
require(rasterVis)
r <- raster(nrow=10, ncol=10)
r[] = 1
r[51:100] = 3
r[3:6, 1:5] = 5
r <- ratify(r)
rat <- levels(r)[[1]]
rat$landcover <- c('Pine', 'Oak', 'Meadow')
levels(r) <- rat
levelplot(r, col.regions=c('palegreen', 'midnightblue', 'indianred1'))


How could I plot only, say, latitude -50 to 50 and longitude -100 to 100?

Thanks in advance,
--
Thiago V. dos Santos
PhD student
Land and Atmospheric Science
University of Minnesota
http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm
Phone: (612) 323 9898 



More information about the R-sig-Geo mailing list