[R-sig-Geo] spplot for raster not drawn
Els Ducheyne
educheyne at avia-gis.be
Tue Sep 13 11:10:28 CEST 2011
dear list
I want to display a time series of data using either spplot or levelplot to verify consistency in the raw images prior to processing (visual quality check)
to do this I am use spplot (or levelplot). This works up to 16 images, however if I want to see more I have to split the inputfiles and put them in a loop. When the loop is executed, I can see the quartz window but the content is not shown.
Does anyone have an idea how to solve this ?
See below for information on OS and versions + code
Thanks for help
Els
require(raster) #raster package = 1.9-5
require(rasterVis) #rasterVis = 0.10-4
setwd(outputdir)
#get all the inputdata
par(ask=T)
inputlist <- list.files(pattern="LSTDay")
datadisplay <- seq(1,length(inputlist),16)
datadisplay <- c(datadisplay,length(inputlist))
n <- length(datadisplay)-1
for (i in 1:n){
input <- inputlist[datadisplay[i]:datadisplay[i+1]-1]
images <- stack(inputlist)
NAvalue(images)<-0
#spplot(images,col.regions=terrain.colors(80)) # quartz is shown but remains empty
levelplot(images,col.regions=terrain.colors(80)) # quartz is shown but remains empty
hist(images,xlim=c(220*50,340*50),n=20) #histograms are displayed in quartz
}
$platform
[1] "i386-apple-darwin9.8.0"
$arch
[1] "i386"
$os
[1] "darwin9.8.0"
$system
[1] "i386, darwin9.8.0"
$status
[1] ""
$major
[1] "2"
$minor
[1] "13.1"
$year
[1] "2011"
$month
[1] "07"
$day
[1] "08"
$`svn rev`
[1] "56322"
$language
[1] "R"
$version.string
[1] "R version 2.13.1 (2011-07-08)"
More information about the R-sig-Geo
mailing list