| classPlot | R Documentation |
This function plots bars for item counts grouped and colored by class.
classPlot(
df,
title = NULL,
xLab = "Value",
yLab = "Item",
legendTitle = "Class",
palette = "Spectral",
labelSize = 2.5,
labelColor = "black",
legendTitleSize = 10,
legendTextSize = 10,
axisTextSize = 12,
axisTitleSize = 12,
decreasing = TRUE,
valueCutoff = 0,
...
)
df |
A data frame with at least three columns. Its first column (categorical) colors the plot bars. The second column (categorical) labels the plots bars. The third column (numeric) sets the bar lengths. |
title |
Plot title. |
xLab |
x axis label. |
yLab |
y axis label. |
legendTitle |
Legend title. |
palette |
Color palette. |
labelSize |
Label size. |
labelColor |
Label color. |
legendTitleSize |
Legend title size. |
legendTextSize |
Legend text size. |
axisTextSize |
Axis text size. |
axisTitleSize |
Axis title size. |
decreasing |
Whether to display the bars in decreasing order of length. |
valueCutoff |
Cutoff used for filtering the input data frame based on the third (value) column. Only values above this cutoff will be displayed on the plot. |
... |
Additional arguments passed to |
An object of class gg.
df <- data.frame(Class = sample(paste0('C', seq(13)), 25, replace=TRUE),
Item = paste0('I', seq(25)),
Value = runif(25, 0.5, 1))
classPlot(df)
df <- data.frame(Class = sample(paste0('C', seq(13)), 25, replace=TRUE),
Item = sample(paste0('I', seq(21)), 25, replace=TRUE),
Value = runif(25, 0.5, 1))
classPlot(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.