closure_plot_bar | R Documentation |
Call closure_plot_bar()
to get a barplot of CLOSURE results.
For each scale value, the bars show how often this value appears in the full list of possible raw data samples found by the CLOSURE algorithm.
closure_plot_bar(
data,
frequency = c("absolute-percent", "absolute", "relative", "percent"),
samples = c("mean", "all"),
bar_alpha = 0.75,
bar_color = "#5D3FD3",
show_text = TRUE,
text_color = bar_color,
text_size = 12,
text_offset = 0.05,
mark_thousand = ",",
mark_decimal = "."
)
data |
List returned by |
frequency |
String (length 1). What should the bars display? The
default, |
samples |
String (length 1). How to aggregate the samples? Either take
the average sample ( |
bar_alpha |
Numeric (length 1). Opacity of the bars. Default is |
bar_color |
String (length 1). Color of the bars. Default is
|
show_text |
Logical (length 1). Should the bars be labeled with the
corresponding frequencies? Default is |
text_color |
String (length 1). Color of the frequency labels. By
default, the same as |
text_size |
Numeric. Base font size in pt. Default is |
text_offset |
Numeric (length 1). Distance between the text labels and
the bars. Default is |
mark_thousand , mark_decimal |
Strings (length 1 each). Delimiters between
groups of digits in text labels. Defaults are |
A ggplot object.
closure_plot_ecdf()
, an alternative visualization.
# Create CLOSURE data first:
data <- closure_generate(
mean = "3.5",
sd = "2",
n = 52,
scale_min = 1,
scale_max = 5
)
# Visualize:
closure_plot_bar(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.