[R] Polygons in Windows metafile
Jim Lemon
jim at bitwrit.com.au
Wed Jan 27 09:05:46 CET 2010
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.
Jim
More information about the R-help
mailing list