| radial_plot {opm} | R Documentation | 
A wrapper for radial.plot from the plotrix
package with some adaptations likely to be useful for
OmniLog(R) data.
  ## S4 method for signature 'MOPMX'
radial_plot(object, ...) 
  ## S4 method for signature 'OPMS'
radial_plot(object, as.labels,
    subset = opm_opt("curve.param"), sep = " ", extract.args = list(), ...) 
  ## S4 method for signature 'data.frame'
radial_plot(object, as.labels,
    subset = "numeric", sep = " ", extract.args = list(), ...) 
  ## S4 method for signature 'matrix'
radial_plot(object, as.labels = NULL,
    subset = TRUE, sep = " ", extract.args = list(), rp.type = "p",
    radlab = FALSE, show.centroid = TRUE, show.grid.labels = 1, lwd = 3,
    mar = c(2, 2, 2, 2), line.col = opm_opt("colors"), draw.legend = TRUE,
    x = "bottom", y = NULL, xpd = TRUE, pch = 15, legend.args = list(),
    group.col = FALSE, point.symbols = 15, point.col = opm_opt("colors"),
    poly.col = NA, main = paste0(as.labels, sep = sep), ...) 
object | 
 
  | 
as.labels | 
 For the   | 
subset | 
 For the   | 
sep | 
 Character scalar determining how to join row
names. See   | 
extract.args | 
 Optional list of arguments passed to
the   | 
rp.type | 
 Character scalar. Among the possible
values ‘p’ for polygons, ‘s’ for symbols
and ‘r’ for radial lines, the latter is not
recommended. These and the following arguments are passed
to   | 
radlab | 
 Logical scalar. Rotation of the outer labels to a radial orientation might safe some space in the graphic.  | 
show.centroid | 
 Logical scalar.  | 
show.grid.labels | 
 Logical scalar. Indicates whether and where display labels for the grid are shown.  | 
lwd | 
 Numeric scalar for the line width.  | 
mar | 
 Numeric vector of length 4 determining the margins of the plot.  | 
line.col | 
 Character or numeric vector for determining the line colour.  | 
point.symbols | 
 Like the following arguments, passed
to   | 
point.col | 
 Indicates the colour(s) of the symbols.  | 
poly.col | 
 Indicates the colour for filling the
drawn polygons, if any.  Use   | 
group.col | 
 Logical scalar indicating whether or not wells from plates that belong to the same group shall have the same colour.  | 
main | 
 The main title of the plot.  | 
... | 
 Optional other arguments passed to
  | 
draw.legend | 
 Logical scalar. Whether to draw a
legend. Ignored unless   | 
x | 
 Legend position, passed to   | 
y | 
 Optional Second legend coordinate. Also passed to that function.  | 
xpd | 
 Logical scalar. Also passed to that function.  | 
pch | 
 Integer scalar. Also passed to that function.  | 
legend.args | 
 List of optional other arguments passed to that function.  | 
The default positioning of the legend is not necessarily
very useful, but suitable combinations of margin,
x and y can be found for given data sizes.
Plotting entire plates usually makes not much sense (see
the examples).
The data frame and OPMS methods extract a
numeric matrix from a given data frame or
OPMS object and pass the result to the
matrix method.
A vector with the row names of object as names and
the corresponding colours as values, equivalent to the
legend; NULL if no row names are present. A list
of such objects in the case of the MOPMX
method.
Lea A.I. Vaas and Markus Goeker
plotrix::radial.plot graphics::legend
Other plotting-functions: ci_plot,
heat_map, level_plot,
parallel_plot, parallelplot,
summary, xy_plot
data("vaas_4")
## 'OPMS' method
# Note that this visualization is not useful when applied to too many wells.
# Thus, we here use only a subset of the wells for plotting.
(y <- radial_plot(vaas_4[, , 1:5], as.labels = list("Species", "Strain"),
  main = "Test", x = 200, y = 200))
 
##      Escherichia coli DSM18039     Escherichia coli DSM30083T 
##                      "#008080"                      "#800080" 
## Pseudomonas aeruginosa DSM1707  Pseudomonas aeruginosa 429SC1 
##                      "#808000"                      "#000000"
# with some fine tuning; note the centroids
(y <-radial_plot(vaas_4[, , 1:5], as.labels = list("Species", "Strain"),
  main = "Test", x = 200, y = 200, rp.type = "s", show.centroid = TRUE))
 
##      Escherichia coli DSM18039     Escherichia coli DSM30083T 
##                      "#008080"                      "#800080" 
## Pseudomonas aeruginosa DSM1707  Pseudomonas aeruginosa 429SC1 
##                      "#808000"                      "#000000"
# with the same colour for members of the same group
(xy <-radial_plot(vaas_4[, , 1:5], as.labels = list("Species"),
  group.col = TRUE, main = "Test", x = 200, y = 200, rp.type = "s",
  show.centroid = TRUE))
## Warning in .local(object, ...): duplicated label: Escherichia coli
 
##       Escherichia coli Pseudomonas aeruginosa 
##              "#008080"              "#800080"
## Data-frame method (rarely needed)
x <- extract(vaas_4, as.labels = list("Species", "Strain"), dataframe = TRUE)
(yy <- radial_plot(x[, 1:8], as.labels = c("Species", "Strain"),
  main = "Test"))
 
##      Escherichia coli DSM18039     Escherichia coli DSM30083T 
##                      "#008080"                      "#800080" 
## Pseudomonas aeruginosa DSM1707  Pseudomonas aeruginosa 429SC1 
##                      "#808000"                      "#000000"
stopifnot(identical(y, yy)) # should also yield the same picture than above
stopifnot(is.character(yy), names(yy) == paste(x$Species, x$Strain))
## Matrix method (rarely needed)
x <- extract(vaas_4, as.labels = list("Species", "Strain"))
(yy <- radial_plot(x[, 1:5], main = "Test"))
##      Escherichia coli DSM18039     Escherichia coli DSM30083T 
##                      "#008080"                      "#800080" 
## Pseudomonas aeruginosa DSM1707  Pseudomonas aeruginosa 429SC1 
##                      "#808000"                      "#000000"
stopifnot(identical(y, yy)) # should also yield the same picture than above
stopifnot(is.character(yy), names(yy) == rownames(x))