View source: R/gf_squareplot.R
| gf_squareplot | R Documentation |
gf_squareplot(
x,
data = NULL,
binwidth = NULL,
origin = NULL,
boundary = NULL,
fill = "#7fcecc",
color = "black",
alpha = 1,
na.rm = TRUE,
mincount = NULL,
bars = c("none", "outline", "solid"),
xbreaks = NULL,
xrange = NULL,
show_dgp = FALSE,
show_mean = FALSE,
auto_subdivide = FALSE
)
x |
Formula ( |
data |
Data frame (required if |
binwidth |
Width of histogram bins. Auto-calculated if |
origin |
Starting position for bins. |
boundary |
Alias for |
fill |
Rectangle fill color. Default |
color |
Rectangle border color. Default |
alpha |
Transparency. Default |
na.rm |
Remove |
mincount |
Minimum y-axis height for consistent scaling. |
bars |
Display style: |
xbreaks |
Number of x-axis breaks or vector of specific positions. |
xrange |
X-axis limits as |
show_dgp |
Show DGP annotation overlay. Default |
show_mean |
Show dashed mean line. Default |
auto_subdivide |
Split bins with >75 observations into sub-columns.
Default |
Creates histograms where individual data points are visible as stacked unit rectangles, making counts easy to visualize. Designed for teaching statistical concepts, particularly sampling distributions.
A ggplot object with S3 class c("gf_squareplot", "gg", "ggplot").
gf_squareplot(~Thumb, data = Fingers)
gf_squareplot(~Thumb, data = Fingers, bars = "outline")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.