[R] a question about levelplot

=?big5?B?s6+x0rx3?= b87605205 at ntu.edu.tw
Wed Apr 7 16:13:32 CEST 2004


Hello everyone

I met a strange problem when I call "levelplot" in another function

>library(lattice)
>mat = matrix(1:9, nrow=3)
>mylevelplot = function() {
+    png('test.png')
+    levelplot(mat)
+    dev.off()
+}
>mylevelplot()
null device
               1

the test.png file is just an regular empty file.

but in another case
>png('test.png')
>levelplot(mat)
>dev.off()
null device
               1

will get a correct image file.

the first case will work correct if I replace the levelplot function by
image function in the above code.
why the first case doesn't work ?

Which I use R-1.8.1 and lattice 0.8-7

Thanks for any help.




More information about the R-help mailing list