问题描述
我正在使用
dev.new(width=5.8, height=3)
par(mfrow=c(1,3),mar=c(1,1,2,1),oma=c(4,1,2,0),mgp=c(3, 0.5, 0))
plot(...)
并将它们处理并粘贴到Microsoft Word中.它们在Word中看起来真的很好(我尝试了不同的宽度,直到找到一种合适的宽度),但是当我打印它们时,它们看起来很糟糕.经过一些网页搜索后,我发现打印分辨率至少应为300ppi.因此,在摆弄了永恒的宽度和高度之后,我想出了一些代码,使这些图看起来大小相同,但分辨率更高:
and coping and pasting them into Microsoft Word. They look really good in Word (I tried different widths until I found one that worked well) but when I printed them they looked terrible. After some web searching I found the resolution for printing should be at least 300ppi. So after fiddling with widths and heights for an eternity I came out with code that makes the plots look the same size but with a better resolution:
png(file="mag_feb.png",width=1800,height=950,res=300)
现在,它们在打印时看起来不错,但是在Word(屏幕上)中根本看起来不清晰.大小可能有问题吗?有没有办法使图形在屏幕上和屏幕上看起来好看?我已经花了数小时的时间,并且想不出其他任何尝试,因此,非常感谢您的帮助!
They now look good when printed, but they don't look sharp at all in Word (on screen). Could it be a problem with size? Isn't there a way to make graphs that look good printed and on screen? I already spent hours with this and can't think of anything else to try, so any help will be very much appreciated!
谢谢!
推荐答案
原始png命令中有一个小错误.试试这个:
There is a small error in your original png command. Try this:
png(file="mag_feb.png", units="in", width=11, height=8.5, res=300)
现在,宽度和高度以英寸为单位,分辨率以像素/英寸为单位.以前,res参数被忽略.
Now, width and height are in inches, and res is in pixels/inch. Before, the res parameter was being ignored.
这篇关于具有良好分辨率的打印和屏幕显示图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!