abundance.plot {LipidomicsR} | R Documentation |
Plot Abundance Data
Description
This function generates bar plots for abundance data.
Usage
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
)
Arguments
data.summary |
A data frame containing summarized abundance data. |
by |
A data frame specifying additional variables for grouping and plotting (default is an empty data frame). |
.width |
The width of bars in the plot (default is 0.5). |
.position_dodge |
The position adjustment parameter for dodging bars (default is 0.5). |
errorbar.type |
The type of error bars to be plotted ('up', 'down', or 'both', default is 'up'). |
errorbar.width |
The width of error bars (default is 0.5). |
.xlab |
The label for the x-axis (default is 'group'). |
.ylab |
The label for the y-axis (default is 'abundance'). |
axis.title.size |
The size of axis title text (default is 10). |
axis.title.x.vjust |
The vertical adjustment parameter for x-axis title (default is 0). |
axis.title.y.vjust |
The vertical adjustment parameter for y-axis title (default is 0). |
axis.text.size |
The size of axis text (default is 10). |
axis.line.size |
The size of axis lines (default is 0.5). |
axis.tick.length |
The length of axis ticks (default is 0.2). |
legend.title |
The title for the legend (default is an empty string). |
legend.color |
The color palette for the legend (default is a set of predefined colors). |
.legend.direction |
The direction of the legend ('horizontal' or 'vertical', default is 'vertical'). |
.legend.position |
The position of the legend ('top', 'bottom', 'left', 'right', or NULL, default is 'right'). |
main.size |
The size of plot titles (default is 10). |
Value
A list of ggplot objects, each representing a bar plot for abundance data of a species.