对于所有R的图形设备,默认文本大小为12点,但可以通过pointsize在打开图形设备的函数中包含参数来重置它.来自?pdf:
pointsize:要使用的默认点大小.严格来说,在bp中,这是1/72英寸,但大约在点数.默认为"12".
例如,打开这样的设备:
## pdf
pdf("plot.pdf", pointsize=7)
## bitmap
bmp("plot.bmp", pointsize=7)
## graphics window on screen
x11(pointsize=7)
## etc., etc. (See ?Devices for a list of available graphics devices.)
Run Code Online (Sandbox Code Playgroud)
然后,在绘制之后,用它关闭它dev.off().