[R] x11() graphic device, displaying raster

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 25 13:05:49 CET 2012


On 25/01/2012 11:45, Johannes Radinger wrote:
> Hello,
>
> I am wondering about the X11() graphic device on Windows.

There is no such device: there is a function of that name as a 
convenience wrapper for windows().

> I try to plot a raster image but nothing gets displayed. I
> found some pages where it is mentioned that x11() not
> always supports raster rendering.

I think you are talking about the X11 device on a Unix-alike, most 
likely long ago.  But for example ?rasterImage says

      Plotting raster images is not supported on all devices and may
      have limitations where supported, for example (e.g. for
      ‘postscript’ and ‘X11(type = "Xlib")’) restricted to opaque
      colors.

'some pages' isn't good enough: do give precise references to back up 
your allegations.

> Is there any add on for x11, any update or any R-package
> which solves that displaying problem in Windows?
>
> What I try to test it is an example from the
> package {raster}:
>
> library(raster)
> DEU_alt<- getData("alt", country="DEU", mask=TRUE)
> x11()
> plot(DEU_alt,axes=TRUE)

That's not really the same usage of 'raster'.   But that example works 
for me (and pops up a windows() device).  It does download a data file, 
and that is often a fragile thing to do.

I used 32-bit R-patched on Windows 7, for the record.

> best regards,
>
> /johannes


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list