You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I figured out how to do this a while ago, but never implemented it. Here's an example:
# create a function that:# 1.) stores the current par settings# 2.) specifies new par settings# 3.) makes some plots using these settings# 4.) resets the par settings to the original ones on exittest=function() {
# obtain parameters of current deviceopar= par()
# remove parameters that cannot be setopar=opar[-which(names(opar) %in% c("cin", "cra", "csi", "cxy", "din", "page"))]
# set new parameters, for use within this function only
par(mar= c(0,0,0,0), mfrow= c(2,2))
plot(1:10)
plot(1:10)
plot(1:10)
# when the function is done, reset the par to the original par settings
on.exit(par(opar))
}
# test this out
plot(1:10, col="blue")
test()
plot(1:10, col="blue")
The text was updated successfully, but these errors were encountered:
I figured out how to do this a while ago, but never implemented it. Here's an example:
The text was updated successfully, but these errors were encountered: