Skip to content

rasterVis - Plot subset of data

3 messages · Oscar Perpiñan, Thiago V. dos Santos

#
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?
6 days later