[R] win.metafile and Linux

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 20 10:05:23 CEST 2003


On Mon, 20 Oct 2003 Ted.Harding at nessie.mcc.ac.uk wrote:

> Hi Folks,
> 
> I see that people have been discussing the win.metafile device
> on the list since before 2000.
> 
> Yet I have never seen this on a Linux distribution of R.
> 
> Is this because the device works by making calls (GPL calls of
> course!) to a proprietary Windows library?

More precisely, it makes calls to the underlying OS: metafiles are
part of Windows.

> In that case I can understand that it would be far from kosher to
> implement it on Linux. But I'd like confirmation.

It's more a question of having the means to do so.  There have been 
projects to produce bitmap metafiles on Linux, but that's not what you 
want.  Look in the archives for discussion, and the Windows TODO on
developer.r-project.org says

The ability to write WMF on Unix. (This means vector WMF, not the
bitmaps that <tt>epstool</tt> and <tt>GSView</tt> make.  One possible
approach (suggested by Ben Bolker) would be to use <a
href="http://sourceforge.net/projects/libemf/"><tt>libEMF</tt></a>.)

Also, current versions of S-PLUS (on Linux/Unix) have wmf.graph() which
demonstrates that it should be feasible to do so.

> I must say that being able to produce Windows metafiles on Linux
> would help to bridge the gap between Linux and Windows: often one
> needs to produce a graphic which will be imported into a Windows
> application, but while PNG and the like are quite nice they don't
> have the merit of being a vector format, and don't scale well.

It's like reading/writing Excel files directly from R: it could be done
but no one has wanted to do it enough to contribute code to do so. It's
unclear if this would be a good use of scarce resources, as people who
want to use Windows applications by definition have access to Windows and
so could re-run scripts to generate plots using R under Windows (which is
what I do when forced to supply .wmf figures).

-- 
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