使用par(mar)
增加绘图边缘,使用par(mgp)
移动坐标轴标签。
par(mar = c(6.5, 6.5, 0.5, 0.5), mgp = c(5, 1, 0))
在帮助页面
?par
中,它解释了哪些参数可以直接在
plot
中使用,哪些必须通过
par
进行调用。
有一些参数只能通过调用'par()'来设置:
• ‘"ask"’,
• ‘"fig"’, ‘"fin"’,
• ‘"lheight"’,
• ‘"mai"’, ‘"mar"’, ‘"mex"’, ‘"mfcol"’, ‘"mfrow"’, ‘"mfg"’,
• ‘"new"’,
• ‘"oma"’, ‘"omd"’, ‘"omi"’,
• ‘"pin"’, ‘"plt"’, ‘"ps"’, ‘"pty"’,
• ‘"usr"’,
• ‘"xlog"’, ‘"ylog"’
The remaining parameters can also be set as arguments (often via
‘...’) to high-level plot functions such as ‘plot.default’,
‘plot.window’, ‘points’, ‘lines’, ‘abline’, ‘axis’, ‘title’,
‘text’, ‘mtext’, ‘segments’, ‘symbols’, ‘arrows’, ‘polygon’,
‘rect’, ‘box’, ‘contour’, ‘filled.contour’ and ‘image’. Such
settings will be active during the execution of the function,
only. However, see the comments on ‘bg’ and ‘cex’, which may be
taken as _arguments_ to certain plot functions rather than as
graphical parameters.