I'm pretty certain there's no par argument that, by itself, does what you want.
Here though is a simpler approach than yours. It uses plot.default()
's panel.first
argument to plot, in the background, a single huge filled point centered at the origin. The point's extent is at least a googol cubed units in every direction, and I've confirmed that this works with R's native Windows plot device, and with pdf and png devices: it appears to be a pretty general solution.
## Your example
plot(x=1, y=2,
panel.first={points(0, 0, pch=16, cex=1e6, col="grey90")
grid(col="white", lty=1)})
## Or, for repeated use, make it a function:
ggbg <- function() {
points(0, 0, pch=16, cex=1e6, col="grey90")
grid(col="white", lty=1)
}
plot(x=1, y=2, panel.first=ggbg())
## Also works for plots running out to 1e300 in each direction
plot(x=-1e300, y=1e300, panel.first=ggbg())
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…