p0 <- SCpubr::do_BarPlot(sample = sample.oligo,
group.by = "relabelling",
split.by = "orig.ident",
facet.by = "subtype",
font.size = 20,
flip = TRUE,
colors.use = cluster_cols,
position = "fill",
legend.position = "none",
order = TRUE,
order.by = "RE",
plot.grid = FALSE,
add.n = TRUE,
add.n.expand = c(0, 1.15),
axis.text.face = "plain",
add.n.size = 5) +
ggplot2::xlab("OD") +
ggplot2::ylab("") +
ggplot2::theme(axis.text.x = ggplot2::element_blank(),
axis.ticks.x = ggplot2::element_blank(),
strip.text = ggplot2::element_blank(),
plot.margin = ggplot2::margin(t = 0, r = 10, b = 0, l = 10))
p1 <- SCpubr::do_BarPlot(sample = sample.astro,
group.by = "relabelling",
split.by = "orig.ident",
facet.by = "subtype",
font.size = 20,
flip = TRUE,
colors.use = cluster_cols,
position = "fill",
legend.position = "bottom",
order = TRUE,
order.by = "RE",
plot.grid = FALSE,
add.n = TRUE,
add.n.expand = c(0, 1.15),
axis.text.face = "plain",
add.n.size = 5,
legend.ncol = 2,
legend.title = "") +
ggplot2::xlab("AS") +
ggplot2::ylab("") +
ggplot2::theme(axis.text.x = ggplot2::element_blank(),
axis.ticks.x = ggplot2::element_blank(),
strip.text = ggplot2::element_blank(),
plot.margin = ggplot2::margin(t = 0, r = 10, b = 0, l = 10))
layout <- paste(c(rep("A", 4), rep("B", 5), "C"), collapse = "\n")
p <- patchwork::wrap_plots(A = p0,
B = p1,
C = patchwork::guide_area(),
design = layout)