ggbox | R Documentation |
Works with labels, as from the labelled
package. Axis labels are handled
somewhat differently depending on whether a single box is present or multiple.
ggbox(X, xlab, horiz = FALSE)
X |
Matrix of values |
xlab |
If omitted, no space will be allocated for x axis title (ylab can be specified as usual; see examples) |
horiz |
Make horizontal? (default: FALSE) |
ggbox(matrix(rnorm(50), 10, 5))
ggbox(matrix(rnorm(50), 10, 5), xlab='categories')
ggbox(rexp(10))
ggbox(rexp(10), 'A plot of') + ggplot2::ylab('Something')
# Using labels
X <- iris[, 1:4]
attr(X[[4]], 'label') <- "The petal's width"
ggbox(X)
ggbox(X[,4])
ggbox(X[,4], horiz=TRUE)
ggbox(X, horiz=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.