View source: R/plot-mcmc-histogram.R
plot_mcmc_histogram | R Documentation |
Plot a histogram for a given column in a data frame
plot_mcmc_histogram(
d,
col_nm,
x_lab = col_nm,
y_lab = "Count",
barplot = FALSE,
lvls = NULL,
scale_effn = 1,
show_ro = FALSE,
show_bar_values = TRUE,
ro_arrow_length = 20,
ro_text_nudge = 0,
ro_text_size = 5,
bar_label_limit = 10,
bar_text_color = "navyblue",
bar_text_size = 2,
x_lim = NULL,
y_lim = NULL,
x_breaks = NULL,
y_breaks = NULL,
x_brk = 0.1,
y_brk = 20,
...
)
d |
A dta frame containing the column with name |
col_nm |
The name of the column in |
x_lab |
The label to show on the x-axis |
y_lab |
The label to show on the y-axis |
barplot |
Logical. If |
lvls |
A vector of levels that should appear in the data if
|
scale_effn |
|
show_ro |
Logical. If |
ro_arrow_length |
The length in count units (y-axis units) of the
arrow pointing to the bin that the R0 parameter is in. Only used if
|
ro_text_nudge |
Amount to nudge to the left(negative) or right (positive) the R0 location label |
ro_text_size |
The font size for the R0 labels |
bar_label_limit |
The number in a bin (count - y-axis), above which the label of the count for the bar is in white in the middle of the bar vertically. Below this value, the bar value will be above the bar. To have all value labels above the bars, set this to a value larger than the highest count bin |
bar_text_color |
The color of the count labels for each bar. Only
used if |
bar_text_size |
The font size of the count labels for each bar. Only
used if |
x_lim |
A vector of two values. The min and max to show on the
x-axis. If |
y_lim |
A vector of two values. The min and max to show on the
y-axis. If |
x_breaks |
A vector of values to show on the x-axis. If |
y_breaks |
A vector of values to show on the y-axis. If |
x_brk |
A value to use to create the |
y_brk |
A value to use to create the |
... |
Additional arguments to pass to the plotting functions
|
A ggplot2::ggplot()
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.