Histogram with statistical details from onesample test included in the plot as a subtitle.
gghistostats( data, x, binwidth = NULL, bar.measure = "count", xlab = NULL, stat.title = NULL, title = NULL, subtitle = NULL, caption = NULL, type = "parametric", test.value = 0, bf.prior = 0.707, bf.message = TRUE, effsize.type = "g", effsize.noncentral = TRUE, conf.level = 0.95, nboot = 100, k = 2, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, bar.fill = "grey50", results.subtitle = TRUE, test.k = 0, test.value.line = FALSE, test.value.line.args = list(size = 1), test.value.label.args = list(size = 3), centrality.parameter = "mean", centrality.k = 2, centrality.line.args = list(size = 1, color = "blue"), centrality.label.args = list(color = "blue", size = 3), normal.curve = FALSE, normal.curve.args = list(size = 3), ggplot.component = NULL, output = "plot", messages = TRUE, ... )
data  A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted. 

x  A numeric variable. 
binwidth  The width of the histogram bins. Can be specified as a
numeric value, or a function that calculates width from 
bar.measure  Character describing what value needs to be represented as
height in the bar chart. This can either be 
xlab  Labels for 
stat.title  A character describing the test being run, which will be
added as a prefix in the subtitle. The default is 
title  The text for the plot title. 
subtitle  The text for the plot subtitle. Will work only if

caption  The text for the plot caption. 
type  Type of statistic expected ( 
test.value  A number specifying the value of the null hypothesis
(Default: 
bf.prior  A numeric value between 
bf.message  Logical that decides whether to display Bayes Factor in
favor of the null hypothesis. This argument is relevant only for
parametric test (Default: 
effsize.type  Type of effect size needed for parametric tests. The
argument can be 
effsize.noncentral  Logical indicating whether to use noncentral
tdistributions for computing the confidence interval for Cohen's d
or Hedge's g (Default: 
conf.level  Scalar between 0 and 1. If unspecified, the defaults return

nboot  Number of bootstrap samples for computing confidence interval
for the effect size (Default: 
k  Number of digits after decimal point (should be an integer)
(Default: 
ggtheme  A function, 
ggstatsplot.layer  Logical that decides whether 
bar.fill  Character input that decides which color will uniformly fill
all the bars in the histogram (Default: 
results.subtitle  Decides whether the results of statistical tests are
to be displayed as a subtitle (Default: 
test.k  Integer denoting the number of decimal places expected for

test.value.line  Logical that decides whether a line corresponding to
the 
test.value.line.args  A list of additional
aesthetic arguments to be passed to the 
test.value.label.args  A list of additional
aesthetic arguments to be passed to the 
centrality.parameter  Decides which measure of central tendency
( 
centrality.k  Integer denoting the number of decimal places expected
for centrality parameter label. (Default: 
centrality.line.args  A list of additional
aesthetic arguments to be passed to the 
centrality.label.args  A list of additional
aesthetic arguments to be passed to the 
normal.curve  A logical value that decides whether to superimpose a
normal curve using 
normal.curve.args  A list of additional aesthetic arguments to be passed to the normal curve. 
ggplot.component  A 
output  Character that describes what is to be returned: can be

messages  Decides whether messages references, notes, and warnings are
to be displayed (Default: 
...  Currently ignored. 
https://indrajeetpatil.github.io/ggstatsplot/articles/web_only/gghistostats.html
# \donttest{ # most basic function call with the defaults # this is the **only** function where data argument can be `NULL` ggstatsplot::gghistostats( data = ToothGrowth, x = len, xlab = "Tooth length", centrality.parameter = "median" )#> Warning: full precision may not have been achieved in 'pnt{final}'#> Warning: full precision may not have been achieved in 'pnt{final}'#>#> Note: ShapiroWilk Normality Test for Tooth length: pvalue = 0.109#># a detailed function call ggstatsplot::gghistostats( data = iris, x = Sepal.Length, bar.measure = "mix", type = "p", caption = substitute(paste(italic("Note"), ": Iris dataset by Fisher.")), bf.prior = 0.8, test.value = 3, test.value.line = TRUE, binwidth = 0.10, bar.fill = "grey50" )#> Warning: full precision may not have been achieved in 'pnt{final}'#> Warning: full precision may not have been achieved in 'pnt{final}'#> Warning: full precision may not have been achieved in 'pnt{final}'#>#> Note: ShapiroWilk Normality Test for Sepal.Length: pvalue = 0.010#># }