[R] Size of win.metafile
Boris Steipe
boris.steipe at utoronto.ca
Tue May 27 19:32:56 CEST 2014
What does Word "think" the object's size is? Is it 4x4 scaled at 133% ? Or is it 5.33 x 5.33 scaled at 100%?
B.
> On May 27, 2014, at 12:28, Jinsong Zhao <jszhao at yeah.net> wrote:
>
> Jean,
>
> Thank you for checking the problem. I have the same software with you.
>
> If I created plot with
> windows(width = 4, height = 4, pointsize = 10)
> plot(1:10)
> Then I "copy as metafile" and paste it into Word. I can get the correct size.
>
> However, if I select "save as metafile" and save it as "abc.emf", then I insert plot from file in Word. I get a plot with size 5.333" x 5.333" and font 16 pt. It's same as creating a plot with win.metafile().
>
> I don't know why there is different.
>
> P.S., I run R in a Windows 7 Pro. laptop with screen resolution 1388 x 768 px and 96 dpi.
>
> Best,
> Jinsong
>
>> On 2014/5/27 5:51, Adams, Jean wrote:
>> Jinsong,
>>
>> When I use your code to create the abcd.emf file, and then copy and
>> paste it into Word, I end up with a 4" x 4" plot with 12 pt font, just
>> as you intended. I'm using R version 3.1.0, and Word 2010 version
>> 14.0.7116.5000. Not sure why it works differently for you.
>>
>> Jean
>>
>>
>> On Mon, May 26, 2014 at 2:34 PM, Jinsong Zhao <jszhao at yeah.net
>> <mailto:jszhao at yeah.net>> wrote:
>>
>> Hi there,
>>
>> I hope to use the emf plot produced by R in Word. However, I have
>> problems with setting the plot size. Here is a mini-example code:
>>
>> win.metafile("abcd.emf", height =4, width=4)
>> plot(1:10)
>> dev.off()
>>
>> I hope to get a emf plot with size 4x4in and pointsize 12pt.
>> However, I got a plot with size 5.333x5.333in and pointsize 16pt in
>> Word. It seems that the emf file report its resolution with 96dpi,
>> but Word assume it with 72dpi.
>>
>> How to control on the dpi? (In my opinion, vector plot has nothing
>> to do with dpi). I just hope to control the size and pointsize with
>> something like the code above.
>>
>> Any suggestions?
>>
>> Best,
>> Jinsong
>
> ______________________________________________
> 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