Skip to content
Prev 39117 / 63421 Next

using rasterImage within image

Hello, I'm afraid the SDI graphics issue is still a problem in 2.13.0
2011-02-09 r54308.

To reproduce, in a fresh R session (Windows in SDI mode):

## create a dummy dataset
m<- matrix(c(0.2, 0.4, 0.6, 0.8), 2, 2)

## simple helper function to open the windows() device and plot the matrix
draw.f<- function(x) {
   plot(0, xlim = c(0, 1), ylim = c(0, 1))
   rasterImage(x, 0, 0, 1, 1, interpolate = FALSE)
}

draw.f(m)

## repeat the following 2 lines five times:

dev.off()
draw.f(m)

On the fifth attempt, only the background plot appears - but the
raster is visible on resize of the windows() device.

Cheers, Mike.

sessionInfo()
R version 2.13.0 Under development (unstable) (2011-02-09 r54308)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base



On Thu, Feb 10, 2011 at 5:31 PM, baptiste auguie
<baptiste.auguie at googlemail.com> wrote: