plotprep: plotprep: sets up a window and the par values for a single...

Description Usage Arguments Value Examples

Description

plotprep: sets up a window and the par values for a single plot. it checks to see if a graphics device is open and opens a new one if not. This is simply a utility function to save typing the standard syntax. Some of the defaults can be changed. Typing the name without () will provide a template for modification. If 'windows' is called repeatedly this will generate a new active graphics device each time leaving the older ones inactive but present. For quick exploratory plots this behaviour is not wanted, hence the check if an active device exists already or not.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotprep(
  width = 6,
  height = 3.6,
  usefont = 7,
  cex = 0.85,
  newdev = TRUE,
  filename = "",
  resol = 300,
  verbose = TRUE
)

Arguments

width

defaults to 6 inches = 15.24cm - width of plot

height

defaults to 3 inches = 7.62cm - height of plot

usefont

default is 7 (bold Times); 1 = sans serif, 2 = sans serif bold

cex

default is 0.85, the size of font used for text within the plots

newdev

reuse a previously defined graphics device or make a new one; defaults to TRUE

filename

defaults to "" = do not save to a filename. If a filename is

resol

the resolution of the png file, if there is one, default=300

verbose

comments to the connsole, default = TRUE

Value

Checks for and sets up a graphics device and sets the default plotting par values. oldpar values returned invisibly

Examples

1
2
3
x <- rnorm(1000,mean=0,sd=1.0)
plotprep()
hist(x,breaks=30,main="",col=2)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.