plotLine | R Documentation |
Generates the response profile of one or more observation i.e. plots of one or more rows of the outcomes matrix on the y-axis against the m response variables on the x-axis. Depending on the response type (spectra, gene expression...), point, line or segment plots are offered.
plotLine( Y, rows = 1, type = c("l", "p", "s"), title = "Line plot", xlab = NULL, ylab = NULL, xaxis_type = c("numeric", "character"), stacked = FALSE, ncol = 1, nrow = NULL, facet_label = NULL, hline = 0, size = 0.5, color = NULL, shape = 1, theme = theme_bw() )
Y |
A numerical matrix containing the rows to be drawn. |
rows |
A vector with either the row name(s) of the Y matrix to plot (character) or the row index position(s). |
type |
Type of graph to be drawn: "p" for point, "l" for line or "s" for segment. |
title |
Plot title. |
xlab |
If not |
ylab |
If not |
xaxis_type |
The data type of the x axis: either "numeric" or "character". |
stacked |
Logical. If |
ncol |
If stacked is |
nrow |
If stacked is |
facet_label |
If stacked is |
hline |
If not |
size |
Argument of length 1 giving the points size (if |
color |
If not |
shape |
The points shape if |
theme |
ggplot theme, see |
A line plot (ggplot).
plotLine(Y = UCH$outcomes) # separate plots plotLine(Y = UCH$outcomes, rows = c(1:4), hline = NULL) plotLine(Y = UCH$outcomes, rows = c(1:4), color = 2) plotLine(Y = UCH$outcomes, rows = c(1:8), ncol=2) plotLine(Y = UCH$outcomes, type = "p", rows = c(1:8), ncol=2) # stacked plots library(ggplot2) plotLine(Y = UCH$outcomes, rows = c(1:4), stacked = TRUE, color = "rows") + scale_color_brewer(palette="Set1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.