BarSpacing
is an option for bar charts that determines the fraction of the bar width to space the bars in a group of bars.
BarSpacing
BarSpacing
is an option for bar charts that determines the fraction of the bar width to space the bars in a group of bars.
Details and Options
- To use BarSpacing, you first need to load the Bar Charts Package using Needs["BarCharts`"].
- BarSpacing sets the distance between bars within a group of bars in BarChart.
- BarSpacing sets the distance between groups of bars in PercentileBarChart and StackedBarChart.
- In BarChart3D, BarSpacing->{m,n} specifies distances between bars in the x and y directions.
Examples
Basic Examples (1)
Needs["BarCharts`"]The bars within a group are tightly packed:
BarChart[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, BarSpacing -> 0]The bars within a group are widely spaced:
BarChart[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, BarSpacing -> 0.2]The columns are widely spaced:
PercentileBarChart[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, BarSpacing -> 0.8]This leaves space in the x direction, but not in the y direction:
BarChart3D[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}, BarSpacing -> {.5, 0}]See Also
Text
Wolfram Research (2008), BarSpacing, Wolfram Language function, https://reference.wolfram.com/language/BarCharts/ref/BarSpacing.html.
CMS
Wolfram Language. 2008. "BarSpacing." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/BarCharts/ref/BarSpacing.html.
APA
Wolfram Language. (2008). BarSpacing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/BarCharts/ref/BarSpacing.html
BibTeX
@misc{reference.wolfram_2026_barspacing, author="Wolfram Research", title="{BarSpacing}", year="2008", howpublished="\url{https://reference.wolfram.com/language/BarCharts/ref/BarSpacing.html}", note=[Accessed: 16-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_barspacing, organization={Wolfram Research}, title={BarSpacing}, year={2008}, url={https://reference.wolfram.com/language/BarCharts/ref/BarSpacing.html}, note=[Accessed: 16-June-2026]}