R/cplot.R

#' Visualization of clustering
#'
#' This function takes input from emb() to plot the dot plot to
#'   visualize the clusters.
#'
#' @param input An object from emb().
#' @return Dot plots.
#' @import ggplot2 ggpubr
#' @export cplot

cplot <- function(input) {
  p1 <- ggplot(input) + geom_point(aes(x=EmbedSOM2, y=EmbedSOM1), shape = 20)
  p2 <- ggplot(input) + geom_point(aes(x=EmbedSOM2, y=EmbedSOM1, col=as.factor(Metacluster)), shape = 20) + theme(legend.position = "bottom", axis.title.y = element_blank())
  ggpubr::ggarrange(p1, p2, ncol = 2, common.legend = T, legend = "bottom")
}
AbhivKoladiya/CytoDataViz documentation built on June 23, 2019, 3:31 a.m.