[R-sig-Geo] spplot for raster not drawn

Paul Hiemstra paul.hiemstra at knmi.nl
Tue Sep 13 11:18:46 CEST 2011


 Use print on your levelplot command. This is in the R FAQ (7.22).

Paul

On 09/13/2011 09:10 AM, Els Ducheyne wrote:
> 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)"
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo


-- 
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770



More information about the R-sig-Geo mailing list