全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
5784 6
2015-01-08
求助:

如题,pdf()中若设定paper="a4",如何调整页面边距?
即:纸张大小我要使用“a4”大小,但我想把页面边距调小些,不知如何操作,求助大家!

谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-1-8 21:32:42
Try changing the "mar" setting in a "par" function call?
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-9 08:50:37
zhangyangsmith 发表于 2015-1-8 21:32
Try changing the "mar" setting in a "par" function call?
It's you! Again!Thank you for your reply!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-9 09:23:21
zhangyangsmith 发表于 2015-1-8 21:32
Try changing the "mar" setting in a "par" function call?
I've tried your method.
复制代码

It works in a way not like what i want.
Let me rephase my question: I  use layout function to save several(6) plots in pdf device in the papersize of a4;but the margin of paper is huge, kind of waste, so i want to small the paper margin to enlarge each plot.

The parameter mar in this situation smaller each plots' margin which not i want it to and the parameter oma seems to quit working.
But thanks anyway! You are my new hero !
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-9 16:30:07
jiangqing001 发表于 2015-1-9 09:23
I've tried your method.
It works in a way not like what i want.
Let me rephase my question: I  ...
Then you just need to set the "width" and "height" options in the "pdf" call. You can set the size of the plotting area within the device the way you like but in inches. According to my search the size of a DIN A4 paper is 8.3*11.7 inches. So, as an example, if you want to leave half an inch in each of the 4 edges you may use "width = 7.3, height = 10.7". As far as I can tell R will do the centering for you.

Here are some dummy plots I have done ("mfrow" was used instead of "layout" just for simplicity):
复制代码

And the result was attached.

附件列表

tmp2.pdf

大小:8 KB

 马上下载

Dummy Plots

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-10 08:53:58
zhangyangsmith 发表于 2015-1-9 16:30
Then you just need to set the "width" and "height" options in the "pdf" call. You can set the size ...
Many thanks!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群