Plot a stack plot
Plot a area plot
stackplot(
otutab,
metadata = NULL,
group = "Group",
get_data = FALSE,
bar_params = list(width = 0.7, position = "stack"),
topN = 8,
others = TRUE,
relative = TRUE,
legend_title = "",
stack_order = TRUE,
group_order = FALSE,
facet_order = FALSE,
style = c("group", "sample")[1],
flow = FALSE,
flow_params = list(lode.guidance = "frontback", color = "darkgray"),
number = FALSE,
repel = FALSE,
format_params = list(digits = 2),
text_params = list(position = position_stack())
)
areaplot(
otutab,
metadata = NULL,
group = "Group",
get_data = FALSE,
bar_params = list(position = "stack"),
topN = 8,
others = TRUE,
relative = TRUE,
legend_title = "",
stack_order = TRUE,
group_order = FALSE,
facet_order = FALSE,
style = c("group", "sample")[1],
number = FALSE,
format_params = list(digits = 2),
text_params = list(position = position_stack())
)
otutab
metadata
one group name of columns of metadata
just get the formatted data?
parameters parse to geom_bar
plot how many top species
should plot others?
transfer to relative or absolute
fill legend_title
the order of stack fill
the order of x group, can be T/F, or a vector of x, or a name, or "cluster"
the order of the facet
"group" or "sample"
should plot a flow plot?
parameters parse to geom_flow
show the number?
use the ggrepel::geom_text_repel instead of geom_text
parameters parse to format
parameters parse to geom_text
a ggplot
a ggplot
data(otutab)
stackplot(otutab, metadata, group = "Group")
# \donttest{
if (interactive()) {
stackplot(otutab, metadata,
group = "Group", style = "sample",
group_order = TRUE, flow = TRUE, relative = FALSE
)
}
# }
data(otutab)
areaplot(otutab, metadata, group = "Id")
# \donttest{
areaplot(otutab, metadata,
group = "Group", style = "sample",
group_order = TRUE, relative = FALSE
)
# }