This function generates bar plots for abundance data.
abundance.plot(
data.summary,
by = data.frame(group = c(), variable.1 = c(), variable.2 = c()),
.width = 0.5,
.position_dodge = 0.5,
errorbar.type = "up",
errorbar.width = 0.25,
.xlab = "group",
.ylab = "abundance",
axis.title.size = 10,
axis.title.x.vjust = 0,
axis.title.y.vjust = 0,
axis.text.size = 10,
axis.line.size = 0.5,
axis.tick.length = 0.2,
legend.title = "",
legend.color = c("#A1A9D0", "#F0988C", "#B883D4", "#9E9E9E", "#CFEAF1", "#C4A5DE",
"#F6CAE5", "#96CCCB"),
.legend.direction = "vertical",
.legend.position = "right",
main.size = 10
)
A list of ggplot objects, each representing a bar plot for abundance data of a species.
A data frame containing summarized abundance data.
A data frame specifying additional variables for grouping and plotting (default is an empty data frame).
The width of bars in the plot (default is 0.5).
The position adjustment parameter for dodging bars (default is 0.5).
The type of error bars to be plotted ('up', 'down', or 'both', default is 'up').
The width of error bars (default is 0.5).
The label for the x-axis (default is 'group').
The label for the y-axis (default is 'abundance').
The size of axis title text (default is 10).
The vertical adjustment parameter for x-axis title (default is 0).
The vertical adjustment parameter for y-axis title (default is 0).
The size of axis text (default is 10).
The size of axis lines (default is 0.5).
The length of axis ticks (default is 0.2).
The title for the legend (default is an empty string).
The color palette for the legend (default is a set of predefined colors).
The direction of the legend ('horizontal' or 'vertical', default is 'vertical').
The position of the legend ('top', 'bottom', 'left', 'right', or NULL, default is 'right').
The size of plot titles (default is 10).