dose <-c(20,30,40,45,60)
drugA<-c(16,20,27,40,60)
drugB<-c(15,18,25,31,40)
plot(dose,drugA,type = "b")
#no.readonly logical; if TRUE and there are no other arguments, only parameters are returned which can be set by a subsequent par() call on the same device.
opar <-par(no.readonly = TRUE)
par(lty=2,pch=17)
plot(dose,drugA,type = "b")
par(opar)
plot(dose,drugA,type = "b")
可以看出通过par(opar),图形又变成了没有修改过的样子,所以可以知道opar保存的是图形参数的原始数据,即par(no.readonly = TRUE)保存图形目前的所以参数,par(opar)还原图形参数。
plot(dose,drugA,type = "b",lty=2,pch=17)
plot(dose,drugA,type = "b")