R pdf set margin
问题 I am trying to set the figure margin for a pdf generated with R. Using mar, I can reduce the plot margins. However the resulted plot is still a square in the middle of the page instead of using all the space. How can I change that? pdf(file = "test.pdf", paper="a4r") par(mar=c(0,0,0,0)+0.1) plot(1:10,1:10) dev.off() Thank you! 回答1: Within pdf(), change the width and height arguments (https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/pdf.html). The default values are 7 and 7, which