View source: R/discrete_barplot.R
plot_discrete_barplot | R Documentation |
Plot discrete bar graph.
plot_discrete_barplot(
df2,
out_dir = ".",
xlab = "",
ylab = "",
facet_by_var = F,
legend_title = "",
pal = NA,
plot_title = "",
gradient_palette = "RdBu",
pos = "stack",
font_size = 20,
line_size = 2,
save.to.file = F
)
df2 |
A data frame with 3 columns: 1) ID = discrete values to group by (i.e. rowAnn1) = bars, 2) variables on x-axis = group of bars, 3) value. |
out_dir |
The output directory where the plots will be saved, default is current working directory. |
xlab |
X axis label. |
ylab |
Y axis label. |
facet_by_var |
If TRUE, facet groups of bars horizontally. |
legend_title |
Title of legend. |
pal |
Vector for colors of values. |
plot_title |
Title of plot. |
gradient_palette |
RColorBrewer palette. See RColorBrewer::display.brewer.all() for all options. |
pos |
How bars should be stacked. Either "fill" (relative ratio, 100% bar) or "stack". See position parameter in |
font_size |
The size of axis title on plots. The size of plot subtitle and caption is font_size / 2. The size of legend text and x axis text is font_size / 3 and font_size / 1.5. |
line_size |
The thickness of axis lines. |
save.to.file |
If TRUE, save plot to file in out_dir. If FALSE, print to panel. |
Plot object if save.to.file is FALSE.
Other plotting:
plot_corrplot()
,
plot_corrplotgg()
,
plot_heatmap()
,
plot_het_barplot()
,
plot_indiv_boxplot()
,
plot_indiv_corrscatt()
,
plot_indiv_paired()
,
plot_overview_boxplot()
,
plot_overview_corr_scatt()
,
plot_profile_barplot()
,
run_corrplot_analysis()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.