View source: R/marginal_plot.R
plot_hd_ci | R Documentation |
Using the output of quantiles_pbci
, create a ggplot object
showing specified quantiles (default to deciles) and their 95
bootstrap confidence intervals. A vertical line marks the median.
plot_hd_ci( data = out, qseq = seq(0.1, 0.9, 0.1), plotzero = TRUE, label.x = "Differences", hjust = -0.05, vjust = 0.2, size_text = 6, colour_q = "#009E73", fill_q = "white", size_q = 4, shape_q = 21, colour_line = "#009E73", size_line = 1, linetype_line = 2, colour_zero = "black", size_zero = 0.5, linetype_zero = 1 )
data |
Data frame created by 'quantiles_pbci'. |
qseq |
Sequence of quantiles to plot - assumes median is in the middle of the sequence - default = deciles. |
quantiles_pbci
set.seed(7) # make fake skewed data x <- rgamma(100, shape=3, scale=1)*10+250 # compute quantiles and their percentile bootstrap confidence intervals out <- quantiles_pbci(x,q=seq(1,9)/10,nboot=2000,alpha=0.05) # make decile plot p <- plot_hd_ci(data=out,plotzero=TRUE,label.x="Onsets in ms", hjust=-.05,vjust=.5,size_text=5, colour_dec = "grey10",fill_dec = "grey90", colour_line = "grey10", linetype_line = 1, size_line = 1) + scale_y_continuous(limits=c(250, 350),breaks=seq(250,350,25))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.