setGraphics {rNMR}R Documentation

Change graphics settings

Description

Change graphics settings for one or more open spectra. This function is provided as a convenience for advanced rNMR users and developers.

Usage

setGraphics(file.name = currentSpectrum, all.files = FALSE, save.backup = TRUE, 
		refresh.graphics = FALSE, bg = NULL, fg = NULL, col.axis = NULL, 
		col.lab = NULL, col.main = NULL,	col.sub = NULL,	col = NULL, usr = NULL, 
		line.color = NULL, pos.color = NULL, neg.color = NULL, proj.color = NULL, 
		conDisp = NULL, nlevels = NULL, clevel = NULL, type = NULL, theta = NULL, 
		phi = NULL,	asp = NULL,	peak.color = NULL, peak.disp = NULL, 
		peak.noiseFilt = NULL, peak.pch = NULL, peak.cex = NULL, 
		peak.labelPos = NULL, thresh.1D = NULL, position.1D = NULL,	offset = NULL, 
		proj.mode = NULL,	proj.type = NULL,	proj.direct = NULL,	filter = NULL, 
		roi.multi = NULL,	roiMain = NULL, roiMax = NULL, roi.bcolor = NULL, 
		roi.tcolor = NULL, roi.lwd = NULL, roi.lty = NULL, roi.cex = NULL, 
		roi.labelPos = NULL, roi.noiseFilt = NULL, roi.w1 = NULL, roi.w2 = NULL, 
		roi.pad = NULL,	w1Range = NULL, w2Range = NULL, overlay.text = NULL)

Arguments

file.name character string or vector; the complete file path(s) to an open spectrum or spectra to be modified, defaults to the current spectrum. Note: file.name must match one of the values returned when calling names(fileFolder).
all.files logical; if TRUE all files will be updated.
save.backup logical; saves an undo/redo point if TRUE.
refresh.graphics logical; if TRUE all plot windows are redrawn.
bg see par.
fg see par.
col.axis see par.
col.lab see par.
col.main see par.
col.sub see par.
col see par.
usr see par.
line.color sets the fg, col.axis, col.lab, col.main, col.sub, and col parameters to the color provided (see colors for a list of usable colors).
pos.color color setting for positive contours (see colors for a list of usable colors).
neg.color color setting for negative contours (see colors for a list of usable colors).
proj.color color setting for 1D plots and projections (see colors for a list of usable colors).
conDisp logical vector; c(TRUE, TRUE) plots positive and negative contours, c(TRUE, FALSE) plots only positive, c(FALSE, TRUE) plots only negative, c(FALSE, FALSE) plots no contours.
nlevels positive integer; the number of contour levels.
clevel positive numeric; the number of standard deviations away from the noise that the lowest contour should be drawn.
type specifies the type of plot to be generated; "image" loads fastest, "contour" produces a contour plot, "filled" produces a filled contour plot, "persp" produces a 3D perspective plot, and "auto" chooses the type based on the size of the spectral window. For 1D spectra, "auto" displays a solid line, "p" displays only points, and "b" displays points connected by a line.
theta perspective plot control (see persp).
phi perspective plot control (see persp).
asp perspective plot control (see persp).
peak.color color setting for peak markers (see colors for a list of usable colors).
peak.disp logical; if TRUE peak markers are displayed.
peak.noiseFilt integer; 0 does not apply a noise filter, 1 applies a mild filter (adjacent points in the direct dimension must be above the noise threshold), and 2 applies a strong filter (all adjacent points must be above the noise threshold)
peak.pch integer or character; the symbol used for peak markers for picked peaks. Equivalent to R's pch graphical parameter, accepts any ASCII character as well as integer values corresponding to predefined symbols in R (see par).
peak.cex numeric (positive); the magnification for peak labels and markers for picked peaks. Equivalent to R's cex graphical parameter (see par).
peak.labelPos justification for peak label text. Must be one of "top", "bottom", "left", or "right".
thresh.1D numeric; the peak picking threshold for 1D spectra.
position.1D numeric; the vertical position of 1D plots within the spectral window.
offset numeric; the percent of total intensity range with which to displace each spectrum. This is used to create stacked 1D spectra and is not passed to 2D plots.
proj.mode logical; if TRUE displays a 1D representation of a 2D spectrum.
proj.type specifies the type of projection to be generated; "auto" displays a solid line, "p" displays only points, and "b" displays points connected by a line.
proj.direct integer 1 or 2; if 1 a projection of the direct dimension is displayed, 2 displays the indirect dimension.
filter function; a function used to create a 1D projection, must be capable of being applied to a vector (e.g. min, max, sd). Function must accept x as its only argument.
roi.multi logical; if TRUE the specified file(s) will appear in the multiple file window.
roiMain logical; if TRUE displays ROIs in the main plot window.
roiMax logical; if TRUE displays a marker in the subplot and multiple file windows on the absolute maximum visible signals within the ROIs.
roi.bcolor color setting for active and inactive ROI boxes. Must be a vector of length 2, c(active, inactive). See colors for a list of usable colors.
roi.tcolor color setting for active and inactive ROI labels. Must be a vector of length 2, c(active, inactive). See colors for a list of usable colors.
roi.lwd numeric vector of length 2; line width for active and inactive ROI boxes, c(active, inactive). Equivalent to R's lwd graphical parameter (see par).
roi.lty box type for active and inactive ROIs. Must be a vector of length 2, c(active, inactive). Equivalent to R's lty graphical parameter (see par). Valid options include: "solid", "dashed", "dotted", "dotdash", "longdash", "twodash", or "blank".
roi.cex numeric (positive); text magnification for active and inactive ROI labels, c(active, inactive). Equivalent to R's cex graphical parameter (see par).
roi.labelPos justification for ROI label text. Must be one of "top", "bottom", "left", or "right".
roi.noiseFilt integer; filter for automatic ROI generation (see ra). 0 does not apply a noise filter, 1 applies a mild filter (adjacent points in the direct dimension must be above the noise threshold), and 2 applies a strong filter (all adjacent points must be above the noise threshold). Note that setting the ROI noise filter to zero may result in errors when using ra in certain spectra.
roi.w1 numeric; fixed size in the indirect dimension (in ppm) for ROIs generated automatically using ra.
roi.w2 numeric; fixed size in the direct dimension (in ppm) for ROIs generated automatically using ra.
roi.pad numeric; padding percentage applied to ROIs generated automatically using ra. This padding is added to the area surrounding the peaks within an ROI and is only applied to the height/width of an ROI if the corresponding roi.w1/roi.w2 argument is not provided.
w1Range numeric vector; chemical shift range (c(lower, upper)) in the indirect dimension. This is provided as an alternative method for modifying the usr parameter.
w2Range numeric vector; chemical shift range (c(lower, upper)) in the direct dimension. This is provided as an alternative method for modifying the usr parameter.
overlay.text logical; if TRUE the names of overlaid spectrum are displayed in the plot window.

Details

Sets graphics parameters for the current spectrum or spectra provided by the file.name argument. This includes values found in par as well as rNMR specific graphics parameters. Note: All changes are applied to the files in fileFolder, with the exception of the global parameters which are modified in the globalSettings list.

Author(s)

Ian A. Lewis ialewis@nmrfam.wisc.edu, Seth C. Schommer schommer@nmrfam.wisc.edu

See Also

ct for plot settings; per for perspective plot settings; co for color settings; pj for 1D projections and slices; ol for overlays; pp for peak picking; roi for ROIs; sr for chemical shift referencing; toolkit for other rNMR utility functions.


[Package rNMR version 1.1.7 Index]