xy_plot {opm} | R Documentation |
Customised plotting of a single PM plate or
multiple plates, using xyplot
from the
lattice package.
## S4 method for signature 'MOPMX' xy_plot(x, ...) ## S4 method for signature 'OPM' xy_plot(x, col = "midnightblue", lwd = 1, neg.ctrl = "A01", base.col = "grey10", base.lwd = lwd, main = list(), xlab = "Time [h]", ylab = "Value [OmniLog units]", theor.max = TRUE, draw.grid = TRUE, strip.fmt = list(), striptext.fmt = list(), rcr = 0.75, ...) ## S4 method for signature 'OPMS' xy_plot(x, col = opm_opt("colors"), lwd = 1, neg.ctrl = "A01", base.col = "black", base.lwd = lwd, main = list(), xlab = "Time [h]", ylab = "Value [OmniLog units]", theor.max = TRUE, draw.grid = TRUE, space = "top", strip.fmt = list(), striptext.fmt = list(), legend.fmt = list(), legend.sep = " ", draw.legend = TRUE, rcr = 0.75, ...) ## S4 method for signature 'data.frame' xy_plot(x, f, groups, col = opm_opt("colors"), lwd = 1, neg.ctrl = NULL, base.col = "black", base.lwd = lwd, main = groups, xlab = elem(f, 3L:2L), ylab = elem(f, 2L), draw.grid = TRUE, space = "top", strip.fmt = list(), striptext.fmt = list(), legend.fmt = list(), legend.sep = " ", draw.legend = TRUE, rcr = 0.75, ...)
x |
|
col |
For the For the It is an error if fewer colours are chosen than the
number of plate grouping levels (see the |
lwd |
Numeric scalar determining the line width. |
neg.ctrl |
Determine the height of a horizontal baseline drawn in each panel.
|
base.col |
Character scalar. Baseline colour (ignored if no baseline is drawn). |
base.lwd |
Numeric scalar determining the width of the baseline (ignored if no baseline is drawn). |
main |
The settings controlling the construction of the main title. If a list, a named list with the following entries (if missing, they are replaced by the respective defaults):
If
|
xlab |
Character scalar. Title of x-axis. Use
|
ylab |
Character scalar. Title of y-axis. Use
|
theor.max |
Logical scalar. Use the theoretical
maximum as maximum of the y-axis? If |
draw.grid |
Logical scalar. Insert background grid? |
space |
Character scalar indicating the position of
the legend; either ‘top’, ‘bottom’,
‘left’ or ‘right’. Might be overwritten by
|
strip.fmt |
List controlling the format of the
description strip above each panel. For instance, the
background colour is set using the bg key. For
further details, see |
striptext.fmt |
List controlling the textual
description at the top of each panel. For instance, the
relative text size is set using the cex key, the
colour by ‘col’, the font by ‘font’ and the
number of lines by ‘lines’. The latter might be of
interest in conjunction with the |
legend.fmt |
List controlling where and how to draw
the legend. The content of the legend (mainly a
description of the assignment of the colours to the
curves) is determined automatically. See argument
‘key’ of |
legend.sep |
Character scalar. Relevant only if more than one columns of metadata have been selected; will then be used as separator to join their names in the legend. |
draw.legend |
Logical scalar. If |
rcr |
Numeric scalar (row-column-ratio) interpreted as number of rows per number of columns. Determines the arrangement of the subplots. |
... |
Arguments that are passed to
|
f |
Formula (for the data-frame method). |
groups |
Character vector (for the data-frame method). |
The optimal number of rows and columns is estimated from the number of selected wells. An optimal font size of the panel headers is also chosen automatically, but can also be adapted by the user, much like most aspects of the resulting graphics output.
In the case of the OPMS
method, if metadata
are selected, curve colours are determined according to
the combinations of these metadata entries, otherwise
each plate gets its own colour.
The data-frame method is not intended for phenotype microarray data. It is currently undocumented and potentially subject to frequent changes or even removal. Users interested in the method should contact the authors.
An object of class ‘trellis’ or list of such
objects. See xyplot
from the lattice package
for details.
Sarkar, D. 2008 Lattice: Multivariate Data Visualization with R. New York: Springer, 265 p.
Vaas, L. A. I., Sikorski, J., Michael, V., Goeker, M., Klenk H.-P. 2012 Visualization and curve parameter estimation strategies for efficient exploration of Phenotype Microarray kinetics. PLoS ONE 7, e34846.
lattice::xyplot
Other plotting-functions: ci_plot
,
heat_map
, level_plot
,
parallel_plot
, parallelplot
,
radial_plot
, summary
# OPM method
## Not run:
##D xy_plot(vaas_1) # note the default main title built from the plate type
## End(Not run)
x <- vaas_1[, 11:22]
# Yields a warning message: we have deleted the default negative control.
xy_plot(x)
## Warning: cannot get negative control from selected position (deleted?);
## error was: subscript out of bounds
# Turn the baseline off => no warning:
xy_plot(x, neg.ctrl = NULL)
# Or guess a baseline:
xy_plot(x, neg.ctrl = 100)
# Some like it ugly:
xy_plot(x, neg.ctrl = 100, col = "pink", base.col = "yellow", main = "Ugly")
# OPMS method
## Not run:
##D # Colour by species and strain; note default main title
##D xy_plot(vaas_4, include = c("Species", "Strain"))
##D # Use the largest of the negative-control maxima as baseline
##D xy_plot(vaas_4, include = c("Species", "Strain"),
##D neg.ctrl = max(vaas_4, "A01"))
## End(Not run)