### Name: par ### Title: Set or Query Graphical Parameters ### Aliases: par .Pars ### Keywords: iplot dplot environment ### ** Examples op <- par(mfrow = c(2, 2), # 2 x 2 pictures on one plot pty = "s") # square plotting region, # independent of device size ## At end of plotting, reset to previous settings: par(op) ## Alternatively, op <- par(no.readonly = TRUE) # the whole list of settable par's. ## do lots of plotting and par(.) calls, then reset: par(op) ## Note this is not in general good practice par("ylog") # FALSE plot(1 : 12, log = "y") par("ylog") # TRUE plot(1:2, xaxs = "i") # 'inner axis' w/o extra space par(c("usr", "xaxp")) ( nr.prof <- c(prof.pilots=16,lawyers=11,farmers=10,salesmen=9,physicians=9, mechanics=6,policemen=6,managers=6,engineers=5,teachers=4, housewives=3,students=3,armed.forces=1)) par(las = 3) barplot(rbind(nr.prof)) # R 0.63.2: shows alignment problem par(las = 0)# reset to default require(grDevices) # for gray ## 'fg' use: plot(1:12, type = "b", main="'fg' : axes, ticks and box in gray", fg = gray(0.7), bty="7" , sub=R.version.string) ex <- function() { old.par <- par(no.readonly = TRUE) # all par settings which # could be changed. on.exit(par(old.par)) ## ... ## ... do lots of par() settings and plots ## ... invisible() #-- now, par(old.par) will be executed } ex()