plotMosaicplot | R Documentation |
Plots a mosaic plot of two grouping variables.
plotMosaicplot(object, grouping, fill_by, clrp = NULL, clrp_adjust = NULL, ...)
object |
An object of class |
grouping |
Character value. The grouping variable that is plotted on the x-axis. |
fill_by |
Character value. The grouping variable that is used to fill the mosaic. |
clrp |
Character value. Specifies the color palette to be used to represent
groups of discrete variables. Run |
clrp_adjust |
Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group. |
... |
Additional arguments given to |
Returns a ggplot that can be additionally customized according to the rules of the ggplot2 framework.
library(SPATA2)
data("example_data")
object <- example_data$object_UKF275T_diet
plotMosaicPlot(object, grouping = "seurat_clusters", fill_by = "bayes_space")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.