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, robust.estimator = "onestep", effsize.type = "g", effsize.noncentral = TRUE, conf.level = 0.95, nboot = 100, k = 2, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, fill.gradient = FALSE, low.color = "#0072B2", high.color = "#D55E00", bar.fill = "grey50", results.subtitle = TRUE, centrality.para = "mean", centrality.color = "blue", centrality.size = 1, centrality.linetype = "dashed", centrality.line.labeller = TRUE, centrality.k = 2, test.value.line = FALSE, test.value.color = "black", test.value.size = 1, test.value.linetype = "dashed", test.line.labeller = TRUE, test.k = 0, normal.curve = FALSE, normal.curve.color = "black", normal.curve.linetype = "solid", normal.curve.size = 1, ggplot.component = NULL, return = "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: 
robust.estimator  If 
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 
fill.gradient  Logical decides whether color fill gradient is to be
displayed (Default: 
low.color, high.color  Colors for low and high ends of the gradient. Defaults are colorblindfriendly. 
bar.fill  If 
results.subtitle  Decides whether the results of statistical tests are
to be displayed as a subtitle (Default: 
centrality.para  Decides which measure of central tendency ( 
centrality.color  Decides color for the vertical line for centrality
parameter (Default: 
centrality.size  Decides size for the vertical line for centrality
parameter (Default: 
centrality.linetype  Decides linetype for the vertical line for
centrality parameter (Default: 
centrality.line.labeller  A logical that decides whether line labels
should be displayed for the centrality.para line (Default: 
centrality.k  Integer denoting the number of decimal places expected
for centrality parameter label. (Default: 
test.value.line  Decides whether test value is to be displayed as a
vertical line (Default: 
test.value.color  Decides color for the vertical line denoting test
value (Default: 
test.value.size  Decides size for the vertical line for test value
(Default: 
test.value.linetype  Decides linetype for the vertical line for test
value (Default: 
test.line.labeller  A logical that decides whether line labels should
be displayed for test.value line (Default: 
test.k  Integer denoting the number of decimal places expected for

normal.curve  Logical decides whether to superimpose a normal curve
using 
normal.curve.color, normal.curve.linetype, normal.curve.size  If

ggplot.component  A 
return  Character that describes what is to be returned: can be

messages  Decides whether messages references, notes, and warnings are
to be displayed (Default: 
https://indrajeetpatil.github.io/ggstatsplot/articles/web_only/gghistostats.html
# 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.para = "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#>