I am trying to figure out how to put a common legend in this ggarrange() function. I know several of the plots have a different color scheme (b and c are the same), but the function only seems to be grabbing the first, and then it is adding odd labels. How do I make a commonlegen that has the colors from all the graphs and doesn't include the odd text in the legend title?
Example Data/plot info for two plots:
> dput(total_OA)
structure(list(data = structure(list(Sample = c("Aer 24hr", "Aer 28day",
"Aer 4hr", "Aer 8hr", "Ana 24hr", "Ana 28day", "Ana 4hr", "Ana 8hr",
"CA 24hr", "CA 28day", "CA 4hr", "CA 8hr", "T0"), Acid = c("Total Organic Acid",
"Total Organic Acid", "Total Organic Acid", "Total Organic Acid",
"Total Organic Acid", "Total Organic Acid", "Total Organic Acid",
"Total Organic Acid", "Total Organic Acid", "Total Organic Acid",
"Total Organic Acid", "Total Organic Acid", "Total Organic Acid"
), Percent = c(2.37, 16.27, 3.15, 4, 2.99, 10.39, 0.98, 2.96,
2.76, 38.5, 2.93, 3.09, 0.3), stdev = c(1.63, 3.54, 0.75, 0.63,
0.98, 0.99, 0.6, 0.91, 0.12, 5.46, 1.06, 0.07, 0)), class = "data.frame", row.names = c(NA,
-13L)), layers = list(<environment>, <environment>), scales = <environment>,
mapping = structure(list(x = ~factor(Sample, level = c("T0",
"Aer 4hr", "Aer 8hr", "Aer 24hr", "Aer 28day", "Ana 4hr",
"Ana 8hr", "Ana 24hr", "Ana 28day", "CA 4hr", "CA 8hr",
"CA 24hr", "CA 28day")), y = ~Percent, fill = ~factor(Acid,
level = c("Total Organic Acid"))), class = "uneval"),
theme = structure(list(line = structure(list(colour = "black",
size = 0.5, linetype = 1, lineend = "butt", arrow = FALSE,
inherit.blank = TRUE), class = c("element_line", "element"
)), rect = structure(list(fill = "white", colour = "black",
size = 0.5, linetype = 1, inherit.blank = TRUE), class = c("element_rect",
"element")), text = structure(list(family = "", face = "plain",
colour = "black", size = 11, hjust = 0.5, vjust = 0.5,
angle = 0, lineheight = 0.9, margin = structure(c(0,
0, 0, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = FALSE, inherit.blank = TRUE), class = c("element_text",
"element")), title = NULL, aspect.ratio = NULL, axis.title = NULL,
axis.title.x = structure(list(), class = c("element_blank",
"element")), axis.title.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.75, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.x.bottom = NULL, axis.title.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = 10,
hjust = NULL, vjust = 1, angle = 90, lineheight = NULL,
margin = structure(c(0, 2.75, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = FALSE), class = c("element_text",
"element")), axis.title.y.left = NULL, axis.title.y.right = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = 0, angle = -90, lineheight = NULL,
margin = structure(c(0, 0, 0, 2.75), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.text = structure(list(family = NULL,
face = NULL, colour = "grey30", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.2,
0, 0, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.2, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.bottom = NULL, axis.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 1, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(0, 2.2, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y.left = NULL, axis.text.y.right = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 0, 2.2), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.ticks = structure(list(colour = "grey20",
size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE,
inherit.blank = TRUE), class = c("element_line",
"element")), axis.ticks.x = NULL, axis.ticks.x.top = NULL,
axis.ticks.x.bottom = NULL, axis.ticks.y = NULL, axis.ticks.y.left = NULL,
axis.ticks.y.right = NULL, axis.ticks.length = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL,
axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL,
axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL,
axis.line = structure(list(colour = "black", size = structure(1, class = "rel"),
linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), axis.line.x = NULL, axis.line.x.top = NULL,
axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL,
axis.line.y.right = NULL, legend.background = structure(list(
fill = NULL, colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), legend.margin = structure(c(5.5, 5.5, 5.5,
5.5), unit = 8L, class = c("margin", "simpleUnit", "unit",
"unit_v2")), legend.spacing = structure(11, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), legend.spacing.x = NULL, legend.spacing.y = NULL,
legend.key = structure(list(), class = c("element_blank",
"element")), legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit",
"unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL,
legend.text = structure(list(family = NULL, face = NULL,
colour = NULL, size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.text.align = NULL, legend.title = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.title.align = NULL, legend.position = "None",
legend.direction = NULL, legend.justification = "center",
legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0,
0, 0, 0), unit = 1L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), legend.box.background = structure(list(), class = c("element_blank",
"element")), legend.box.spacing = structure(11, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), panel.background = structure(list(
fill = "white", colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), panel.border = structure(list(), class = c("element_blank",
"element")), panel.spacing = structure(5.5, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), panel.spacing.x = NULL, panel.spacing.y = NULL,
panel.grid = structure(list(colour = "grey92", size = NULL,
linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), panel.grid.major = structure(list(), class = c("element_blank",
"element")), panel.grid.minor = structure(list(), class = c("element_blank",
"element")), panel.grid.major.x = NULL, panel.grid.major.y = NULL,
panel.grid.minor.x = NULL, panel.grid.minor.y = NULL,
panel.ontop = FALSE, plot.background = structure(list(
fill = NULL, colour = "white", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), plot.title = structure(list(family = NULL,
face = NULL, colour = NULL, size = 10, hjust = 0.5,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 5.5, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = FALSE), class = c("element_text",
"element")), plot.title.position = "panel", plot.subtitle = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 5.5, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = 1, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(5.5, 0, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption.position = "panel", plot.tag = structure(list(
family = NULL, face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag.position = "topleft", plot.margin = structure(c(5.5,
5.5, 5.5, 5.5), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), strip.background = structure(list(
fill = "white", colour = "black", size = structure(2, class = "rel"),
linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), strip.background.x = NULL, strip.background.y = NULL,
strip.placement = "inside", strip.text = structure(list(
family = NULL, face = NULL, colour = "grey10", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(4.4, 4.4, 4.4, 4.4), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), strip.text.x = NULL, strip.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), strip.text.y.left = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = 90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element"))), class = c("theme", "gg"), complete = TRUE, validate = TRUE),
coordinates = <environment>, facet = <environment>, plot_env = <environment>,
labels = list(y = "% of Dry Matter by Mass", x = "factor(Sample, level = c(\"T0\", \"Aer 4hr\", \"Aer 8hr\", \"Aer 24hr\", ...",
fill = "factor(Acid, level = c(\"Total Organic Acid\"))",
ymin = "Percent - stdev", ymax = "Percent + stdev")), class = c("gg",
"ggplot"))
> dput(t0_24hr)
structure(list(data = structure(list(Sample = c("Aer 24hr", "Aer 24hr",
"Aer 24hr", "Aer 24hr", "Aer 24hr", "Aer 24hr", "Aer 4hr", "Aer 4hr",
"Aer 4hr", "Aer 4hr", "Aer 4hr", "Aer 4hr", "Aer 8hr", "Aer 8hr",
"Aer 8hr", "Aer 8hr", "Aer 8hr", "Aer 8hr", "Ana 24hr", "Ana 24hr",
"Ana 24hr", "Ana 24hr", "Ana 24hr", "Ana 24hr", "Ana 4hr", "Ana 4hr",
"Ana 4hr", "Ana 4hr", "Ana 4hr", "Ana 4hr", "Ana 8hr", "Ana 8hr",
"Ana 8hr", "Ana 8hr", "Ana 8hr", "Ana 8hr", "CA 24hr", "CA 24hr",
"CA 24hr", "CA 24hr", "CA 24hr", "CA 24hr", "CA 4hr", "CA 4hr",
"CA 4hr", "CA 4hr", "CA 4hr", "CA 4hr", "CA 8hr", "CA 8hr", "CA 8hr",
"CA 8hr", "CA 8hr", "CA 8hr", "T0", "T0", "T0", "T0", "T0", "T0"
), Acid = c("Acetic Acid", "Butyric Acid", "Isovaleric Acid",
"Lactic Acid", "Propionic Acid", "Valeric Acid", "Acetic Acid",
"Butyric Acid", "Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid", "Acetic Acid", "Butyric Acid", "Isovaleric Acid",
"Lactic Acid", "Propionic Acid", "Valeric Acid", "Acetic Acid",
"Butyric Acid", "Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid", "Acetic Acid", "Butyric Acid", "Isovaleric Acid",
"Lactic Acid", "Propionic Acid", "Valeric Acid", "Acetic Acid",
"Butyric Acid", "Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid", "Acetic Acid", "Butyric Acid", "Isovaleric Acid",
"Lactic Acid", "Propionic Acid", "Valeric Acid", "Acetic Acid",
"Butyric Acid", "Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid", "Acetic Acid", "Butyric Acid", "Isovaleric Acid",
"Lactic Acid", "Propionic Acid", "Valeric Acid", "Acetic Acid",
"Butyric Acid", "Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid"), Percent = c(0.08, 0.02, 0, 0.04, 0.63, 0, 0.05,
0, 0.01, 0.02, 0.7, 0, 0.1, 0.01, 0.02, 0.04, 0.95, 0, 0.04,
0.03, 0, 0.07, 0.71, 0, 0.02, 0, 0, 0, 0.23, 0, 0.04, 0.01, 0,
0.02, 0.7, 0, 0.02, 0, 0, 0.28, 0.62, 0, 0.01, 0, 0, 0.14, 0.68,
0, 0.01, 0, 0, 0.31, 0.78, 0, 0.02, 0, 0, 0, 0.05, 0), stdev = c(0.07,
0.02, 0, 0.04, 0.41, 0, 0.03, 0, 0.01, 0.01, 0.16, 0, 0.07, 0,
0.01, 0.02, 0.08, 0, 0.03, 0.01, 0, 0.04, 0.2, 0, 0.02, 0, 0,
0, 0.14, 0, 0.04, 0.01, 0, 0.01, 0.23, 0, 0, 0, 0, 0.01, 0.03,
0, 0.01, 0, 0, 0.05, 0.19, 0, 0, 0, 0.01, 0.01, 0.01, 0, 0, 0,
0, 0, 0, 0)), class = "data.frame", row.names = c(NA, -60L)),
layers = list(<environment>, <environment>), scales = <environment>,
mapping = structure(list(x = ~factor(Sample, level = c("T0",
"Aer 4hr", "Aer 8hr", "Aer 24hr", "Ana 4hr", "Ana 8hr",
"Ana 24hr", "CA 4hr", "CA 8hr", "CA 24hr")), y = ~Percent,
fill = ~factor(Acid, level = c("Acetic Acid", "Butyric Acid",
"Isovaleric Acid", "Lactic Acid", "Propionic Acid",
"Valeric Acid"))), class = "uneval"), theme = structure(list(
line = structure(list(colour = "black", size = 0.5, linetype = 1,
lineend = "butt", arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), rect = structure(list(fill = "white", colour = "black",
size = 0.5, linetype = 1, inherit.blank = TRUE), class = c("element_rect",
"element")), text = structure(list(family = "", face = "plain",
colour = "black", size = 11, hjust = 0.5, vjust = 0.5,
angle = 0, lineheight = 0.9, margin = structure(c(0,
0, 0, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = FALSE, inherit.blank = TRUE), class = c("element_text",
"element")), title = NULL, aspect.ratio = NULL, axis.title = NULL,
axis.title.x = structure(list(), class = c("element_blank",
"element")), axis.title.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.75, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.x.bottom = NULL, axis.title.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = 10,
hjust = NULL, vjust = 1, angle = 90, lineheight = NULL,
margin = structure(c(0, 2.75, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = FALSE), class = c("element_text",
"element")), axis.title.y.left = NULL, axis.title.y.right = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = 0, angle = -90, lineheight = NULL,
margin = structure(c(0, 0, 0, 2.75), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.text = structure(list(family = NULL,
face = NULL, colour = "grey30", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.2,
0, 0, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.2, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.bottom = NULL, axis.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 1, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(0, 2.2, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y.left = NULL, axis.text.y.right = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 0, 2.2), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), axis.ticks = structure(list(colour = "grey20",
size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE,
inherit.blank = TRUE), class = c("element_line",
"element")), axis.ticks.x = NULL, axis.ticks.x.top = NULL,
axis.ticks.x.bottom = NULL, axis.ticks.y = NULL, axis.ticks.y.left = NULL,
axis.ticks.y.right = NULL, axis.ticks.length = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL,
axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL,
axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL,
axis.line = structure(list(colour = "black", size = structure(1, class = "rel"),
linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), axis.line.x = NULL, axis.line.x.top = NULL,
axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL,
axis.line.y.right = NULL, legend.background = structure(list(
fill = NULL, colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), legend.margin = structure(c(5.5, 5.5, 5.5,
5.5), unit = 8L, class = c("margin", "simpleUnit", "unit",
"unit_v2")), legend.spacing = structure(11, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), legend.spacing.x = NULL, legend.spacing.y = NULL,
legend.key = structure(list(), class = c("element_blank",
"element")), legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit",
"unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL,
legend.text = structure(list(family = NULL, face = NULL,
colour = NULL, size = 8, hjust = NULL, vjust = NULL,
angle = NULL, lineheight = NULL, margin = NULL, debug = NULL,
inherit.blank = FALSE), class = c("element_text",
"element")), legend.text.align = NULL, legend.title = structure(list(), class = c("element_blank",
"element")), legend.title.align = NULL, legend.position = "right",
legend.direction = NULL, legend.justification = "center",
legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0,
0, 0, 0), unit = 1L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), legend.box.background = structure(list(), class = c("element_blank",
"element")), legend.box.spacing = structure(11, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), panel.background = structure(list(
fill = "white", colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), panel.border = structure(list(), class = c("element_blank",
"element")), panel.spacing = structure(5.5, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), panel.spacing.x = NULL, panel.spacing.y = NULL,
panel.grid = structure(list(colour = "grey92", size = NULL,
linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), panel.grid.major = structure(list(), class = c("element_blank",
"element")), panel.grid.minor = structure(list(), class = c("element_blank",
"element")), panel.grid.major.x = NULL, panel.grid.major.y = NULL,
panel.grid.minor.x = NULL, panel.grid.minor.y = NULL,
panel.ontop = FALSE, plot.background = structure(list(
fill = NULL, colour = "white", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), plot.title = structure(list(family = NULL,
face = NULL, colour = NULL, size = 10, hjust = 0.5,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 5.5, 0), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), debug = NULL, inherit.blank = FALSE), class = c("element_text",
"element")), plot.title.position = "panel", plot.subtitle = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 5.5, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = 1, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(5.5, 0, 0, 0), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption.position = "panel", plot.tag = structure(list(
family = NULL, face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag.position = "topleft", plot.margin = structure(c(5.5,
5.5, 5.5, 5.5), unit = 8L, class = c("margin", "simpleUnit",
"unit", "unit_v2")), strip.background = structure(list(
fill = "white", colour = "black", size = structure(2, class = "rel"),
linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), strip.background.x = NULL, strip.background.y = NULL,
strip.placement = "inside", strip.text = structure(list(
family = NULL, face = NULL, colour = "grey10", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(4.4, 4.4, 4.4, 4.4), unit = 8L, class = c("margin",
"simpleUnit", "unit", "unit_v2")), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), strip.text.x = NULL, strip.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit",
"unit", "unit_v2")), strip.text.y.left = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = 90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element"))), class = c("theme", "gg"), complete = TRUE, validate = TRUE),
coordinates = <environment>, facet = <environment>, plot_env = <environment>,
labels = list(y = "% of Dry Matter by Mass", x = "factor(Sample, level = c(\"T0\", \"Aer 4hr\", \"Aer 8hr\", \"Aer 24hr\", ...",
fill = "factor(Acid, level = c(\"Acetic Acid\", \"Butyric Acid\", \"Isovaleric Acid\", ...",
ymin = "Percent - stdev", ymax = "Percent + stdev")), class = c("gg",
"ggplot"))
ggarrange() function:
> ggarrange(total_OA,t0_24hr,all_28day,sa_only,labels="auto",
+ font.label=list(size=10),hjust=-0.5,common.legend = T)+
+ theme(plot.margin=margin(0.1,0.1,0.1,1,"cm"),
+ plot.title = element_text(size=10),legend.text=element_text(size=6))
>
plot