[R] plots to metafile and x/y ratio

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Sat Mar 15 19:05:47 CET 2003


On Sat, 15 Mar 2003, juli g. pausas wrote:

> I have a problem which I'm not sure if it is due to my machine or if I'm 
> doing something wrong.
> 
> I'm ploting a little map using  plot(val, type="l", asp=1)  where val is 
> the object with the latitude/longitude data.
> In the screen the figure is perfect, and I can copy to the clipboard and 
> paste it to other places. I can also saved using png() or jpeg(), 
> althoug the quality is much lower. However when I try to save it as 
> metafile (from the plot window or by using win.matafile), the file I 
> obtain do not keep the x/y ratio. I'm interested in this metafile 
> because the quality in much higher then the png, jpeg.  Any suggestion?

The quality is even higher in postscript or PDF.

> I'm working with R.1.6.1. on Windows.
> If somebody is interested, I could send them the files, they are very 
> small (45 KB).

You cannot look at a win.metafile (it is a binary file in a proprietary
format); you need an application to display it and there is no reason why
that application should preserve the aspect ratio.  I just tried pasting
into Word, inserting in Word and a clipboard viewer and all preserved the
aspect ratio, but in each case it could be lost by resizing.

What exactly did you do with the metafile?


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