Description Usage Arguments Details Value
View source: R/hint_plotting.R
Plot a distribution or visualise the result of a hypothesis test.
1 2 3 4 5 6 7 8 9 10 11 |
distr |
A data frame or matrix in which the first column gives random variable values, and the second gives probabilities. Can also be a vector (in which case random variables of 0:length(distr) will be automatically assigned, or an object of class hint.test. |
col |
A character string naming the colour to use for the distribution. Defaults to "black". |
test.col |
A character string naming the colour to use for the region in which the cumulative probability of the hypothesis test was derived (if it exists). Defaults to "red". |
xlim |
A vector of two numbers giving the range for the x-axis. If NULL (default), then this is determined by the maximum and minimum values in distr. |
ylim |
A vector of two numbers giving the range for the y-axis. If NULL (default), then this is determined by the maximum and minimum values in distr. |
xlab |
A character string giving a label for the x-axis. Deafults to "Intersection size (v)". |
ylab |
A character string giving a label for the y-axis. Deafults to "Probability". |
add |
Logical. Whether the plot will be added to an existing plot or not. Defaults to FALSE. |
... |
Additional arguments to be passed to plot. |
Visualising the results of a hypothesis test may often be of interest, but can be especially useful for pedagogical purposes.
Plots to the current device.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.