par(ask=TRUE) opar <- par(no.readonly=TRUE) # record current settings # Listing 11.1 - A scatter plot with best fit lines attach(mtcars) plot(wt, mpg, main="Basic Scatterplot of MPG vs. Weight", xlab="Car Weight (lbs/1000)", ylab=&q
par(ask=TRUE) opar <- par(no.readonly=TRUE) # make a copy of current settings attach(mtcars) # be sure to execute this line plot(wt, mpg) abline(lm(mpg~wt)) title("Regression of MPG on Weight") # Input data for drug example dose <- c(20, 3
在R语言中, 绘图边框一共有3个区域: device region : figure region : plot region : 在描述不同区域大小的时候,有对应的不同参数: din : 返回device region 的宽度和高度, 单位为 inches fin : 返回figure region 的宽度和高度,单位为 inches pin : 返回plot region 的宽度和高度, 单位为inches 代码示例: > pdf("a.pdf", height = 10