| stack_plot | R Documentation |
Produces stacked bar plots using base graphics or ggplot2 showing amounts of cell subclasses in deconvoluted bulk samples.
stack_plot(
x,
percent = FALSE,
order_col = 1,
scheme = NULL,
order_cells = c("none", "increase", "decrease"),
seriate = NULL,
cex.names = 0.7,
show_xticks = TRUE,
...
)
stack_ggplot(
x,
percent = FALSE,
order_col = 1,
scheme = NULL,
order_cells = c("none", "increase", "decrease"),
seriate = NULL,
legend_ncol = NULL,
legend_position = "bottom",
show_xticks = FALSE
)
x |
matrix of deconvolution results with samples in rows and cell subclasses or groups in columns. If a 'deconv' class object is supplied the deconvolution values for the cell subclasses are extracted and plotted. |
percent |
Logical whether to scale the matrix rows as percentage. |
order_col |
Numeric value for which column (cell subclass) to use to
sort the bars - this only applies if |
scheme |
Vector of colours. If not supplied, the default scheme uses
|
order_cells |
Character value specifying with cell types are ordered by abundance. |
seriate |
Character value which enables ordering of samples using the
|
cex.names |
Character expansion controlling bar names font size. |
show_xticks |
Logical whether to show rownames as x axis labels. |
... |
Optional arguments passed to |
legend_ncol |
Number of columns for ggplot2 legend. If set to |
legend_position |
Position of ggplot2 legend |
The base graphics function has no return value. It plots a stacked barchart using base graphics. The ggplot2 version returns a ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.