[R] Polygons in Windows metafile

David Winsemius dwinsemius at comcast.net
Wed Jan 27 13:20:27 CET 2010


On Jan 27, 2010, at 3:05 AM, Jim Lemon wrote:

> On 01/27/2010 10:58 AM, Steve Taylor wrote:
>> Hi all,
>>
>> I'm producing some pie charts (Yes I know!) and plotting them into  
>> a Windows metafile.  This is for insertion into a Word document.
>>
>> The circles come out rather jagged when you zoom in on them, the  
>> cause of which I have perhaps narrowed down to the way polygon()  
>> works in the metafile device.  The polygon coordinates seem to be  
>> quantised to the pixels, which is odd for a vector graphics format.
>>
>> Try this to see what I mean:
>>
>> win.metafile('test.emf')
>> par(mfrow=c(2,2))
>> for(i in 1:4) pie(sample(5,4,repl=TRUE))
>> dev.off()
>>
>> Is there a way to get a better quality EMF file of this output?   
>> PDF output looks great, but Word doesn't seem to understand  
>> inserting a PDF graphics file.  Word also did something strange  
>> with EPS output.
>
> Hi Steve,
> I don't have Word here to test your code, but OpenOffice is free and  
> it does a _much_ better job on things like this. Just a suggestion.
>

OO.o does not import pdf or eps files for me. I generally need to  
convert to tiff format to get importation into OO.o files. Am I  
missing an obvious (or obscure) method? I'm generally using a Mac so  
would not be using win.metafile().

-- 
David.


> Jim
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list