gg_barplot | R Documentation |
Barplot with ggplot2
gg_barplot( data.mn, row_levels.vc = NA, col_levels.vc = NA, title.c = "", xlab.c = "", ylab.c = "", palette.vc = "Set1", cex_axis.i = 18, cex_bar.i = 10, cex_title.i = 28, bar_just.n = 0.9, figure.c = c("interactive", "my_barplot.pdf", "none")[1] )
data.mn |
Matrix of numerics: values to be barplotted |
row_levels.vc |
Vector of characters: levels of rownames (default: NA: alphabetical order will be used) |
col_levels.vc |
Vector of characters: levels of colnames (default: NA: alphabetical order will be used) |
title.c |
Character: plot title |
xlab.c |
Character: x label |
ylab.c |
Character: y label |
palette.vc |
Character: either the name of an RColorBrewer palette (default: 'Set1'; 'Paired' can be useful for parallel plotting) or a vector manually defining the colors |
cex_axis.i |
Integer: size of axis text (default: 18) |
cex_bar.i |
Integer: size of bar value text (default: 10) |
cex_title.i |
Integer: size of title text (default: 28) |
bar_just.n |
Numeric: adjustment of bar value text (default : 0.9) |
figure.c |
Character: either 'interactive' for interactive display, 'my_barplot.pdf' for figure saving (only the extension matters), or 'none' to prevent plotting |
invisible ggplot2 object
prometis.mset <- phenomis::reading(system.file("extdata/prometis", package = "phenomis")) dims.mn <- sapply(names(prometis.mset), function(set.c) { Biobase::dims(prometis.mset[[set.c]])}) dims.mn <- t(dims.mn) colnames(dims.mn) <- c("Features", "Samples") gg_barplot(dims.mn, title.c = "ProMetIS data") prometis_dims.ls <- Biobase::dims(prometis.mset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.