[R] Cairo package, png files within for loop are black?
Douglas M. Hultstrand
dmhultst at metstat.com
Thu Oct 22 19:46:24 CEST 2009
Hello,
I am generating .png images using the Cairo package in a for loop
(looping on the number of zones, number of zones equals the number of
plots to create based on different zone data). When I run the R
script the .png files are created but they are all black? If I comment
out the for loop and force my zones to equal one the png file is created
correctly? Is there an issue with generating .png files within a for loop?
Create .png commands within for loop:
CairoPNG(paste(t.g), width=800, height=600, pointsize=12, bg="white")
xyplot(areasqmi ~ value, x.p, groups=dur,
main=(t.n), ylab=expression("Area(mi" ^ 2 * ")"),
xlab="Maximum Average Depth of Percipitation (inches)",
scales=list(y=list(log=TRUE)), ylim=c(1,1000000), type='l',
auto.key=list(space='right'))
dev.off()
--
---------------------------------
Douglas M. Hultstrand, MS
Senior Hydrometeorologist
Metstat, Inc. Windsor, Colorado
voice: 970.686.1253
email: dmhultst at metstat.com
web: http://www.metstat.com
More information about the R-help
mailing list