[R] Getting R graphics into MS Word (more)

tra tra at proteus.co.uk
Fri Jul 23 12:19:46 CEST 1999


Further to my earlier question.

Thank you to:
John Maindonald, Ramon Diaz-Uriarte, Brian Ripley, Alvaro Novo, Simon
Bond and David Scott
for your helpful replies.

I have looked at the problem in some more detail.

I am using
Rgui.exe Version 0.64.2  (July 3, 1999)
running under Windows NT

To demonstrate the problem, I run the program:

> win.graph(width=5, height=3)
> data(women)
> plot(women)

Then, in the graph window, I select the command
Save as metafile
using the right mouse button, and save the file in c:\temp\women2.emf

Then, in Microsoft Word (97 SR 2) , I can import this file using
Insert/Picture/FromFile

When I do this, the picture is truncated to about 70% of its correct
width and height.

I have looked at the metafile produced by R, and can make it import
correctly into Word by increasing the FrameRight and FrameBottom
parameters (at offset 0020x and 0024x in the file) by a factor of 1.49.

Using Copy as Metafile and the Paste in Word does the same as using an
intermediate file, but with no chance to view or edit the emf file
header.

It looks to me as if there is a problem, either in the way that R
calculates the Frame or Scaling parameters, or in the way that the Word
import filter handles them.

Is there any way I can change the Frame information that R puts in the
emf file?
Has anyone managed to get this to work nicely in Word - perhaps there is
a Word configuration file that needs to be amended.

I have attached the emf file, in case it is of use to any of you.

Thanks for your help

Tim Auton




--
T R Auton PhD MSc C.Math
Head of Biomedical Statistics
Proteus Molecular Design Ltd
Beechfield House
Lyme Green Business Park
Macclesfield
Cheshire SK11 0JL
UK
email: tra at proteus.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: women2.emf
Type: application/x-unknown-content-type-emf_auto_file
Size: 16136 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/19990723/0971c366/women2.bin


More information about the R-help mailing list