save_beeswarm_plots | R Documentation |
Draws a beeswarm plot of feature abundances in each group. A separate plot is drawn and saved for each feature.
save_beeswarm_plots(
object,
all_features = FALSE,
save = TRUE,
file_path = NULL,
format = "emf",
x = group_col(object),
add_boxplots = FALSE,
title = "Feature_ID",
subtitle = NULL,
color = group_col(object),
color_scale = getOption("notame.color_scale_dis"),
text_base_size = 14,
cex = 2,
size = 2,
title_line_length = 40,
theme = theme_bw(base_size = text_base_size),
...
)
object |
a MetaboSet object |
all_features |
logical, should all features be used? If FALSE (the default), flagged features are removed before visualization. |
file_path |
character, a file path for PDF or prefix added to the file paths for other formats |
format |
character, format in which the plots should be saved |
x |
character, name of the column to be used as x-axis |
add_boxplots |
logical, should boxplots be added to the figure? |
title , subtitle |
column names from fData to use as plot title/filename and subtitle. Set to NULL for no title/subtitle, this creates running numbered filenames |
color |
character, name of the column to be used for coloring |
color_scale |
the color scale as returned by a ggplot function |
text_base_size |
integer, base size for text in figures |
cex |
numeric, scaling for adjusting point spacing |
size |
numeric, size of points |
title_line_length |
integer, maximum length of the title line in characters, passed to stringr::str_wrap |
theme |
a ggplot theme to be added to the plot |
... |
other arguments to graphic device functions, like width and height |
save_plot
## Not run:
# Default beeswarms by group
save_beeswarm_plots(drop_qcs(merged_sample),
file_path = "./beeswarm_plots.pdf",
format = "pdf"
)
# x and color can be a different variable
save_beeswarm_plots(drop_qcs(merged_sample)[1:10],
file_path = "./beeswarm_plots/",
format = "png",
x = "Time",
color = "Group"
)
## End(Not run)
# Plot one feature
save_beeswarm_plots(drop_qcs(merged_sample)[5, ], save = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.