自己指定图片大小和图片分辨率都没问题。至于大小和分辨率怎么搭配的话,你得自己去了解下。这个是 R Graphic Cookbook里介绍图片输出的片段:
You can specify a number of arguments to adjust the graph as per your needs. The simplest
one that we've already used is the filename. You can also adjust the height and width settings
of the graph:
png("scatterplot.png",
height=600,
width=600)
The default units for height and width are pixels but you can also specify the units in inches, cm or mm:
png("scatterplot.png",
height=4,
width=4,
units="in")
The resolution of the saved image can be specified in dots per inch (dpi) using the
res argument:
png("scatterplot.png",
res=600)
If you want your graphs saved in a vector format, you can also save them as a PDF file usingthe pdf() function:
pdf("scatterplot.pdf")