Repository navigation
ENH: Make the default bar width slimmer - #176
Merged
Merged
Conversation
A bar is now 0.55 of the pitch wide by default rather than 0.8, which gives a lighter default chart. The default gap between the clusters of the bars helper becomes 0.45 to match, so that a lone series of the helper is drawn exactly as bar draws it. Histograms are unchanged, because they place their bars on the widths of their bins.
thclark
added a commit
that referenced
this pull request
Oct 26, 2026
A bar is now 0.55 of the pitch wide by default rather than 0.8, which gives a lighter default chart. The default gap between the clusters of the bars helper becomes 0.45 to match, so that a lone series of the helper is drawn exactly as bar draws it. Histograms are unchanged, because they place their bars on the widths of their bins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The default width of a bar becomes 0.55 of the pitch instead of 0.8, which gives a lighter and more elegant default chart. The change applies wherever the default is taken:
Default for BarWidthand thereforeDefault for Bar, the Protocol Buffers decoding of an absent width, and the facade'sbarandbarh.The
barshelper's default gap between clusters becomes 0.45 instead of 0.2, so that a cluster occupies 0.55 of the pitch and a single series drawn withbarsis stored exactly as one drawn withbar. Histograms are unaffected, becausehistandhistsplace touching bars on the widths of their bins with an explicit gap of 0.Tests
bars, upright and lying flat, is stored with the same positions, values, bases, width, offset, margin and style asbarstores the same data.Documentation
The figure schema reference, the getting-started guide and the rustdoc of
BarWidth,Bar,bar,bars,BarMut::width_pitchandBarsMut::gapstate the new defaults.Gallery
Two figures rely on the defaults and change:
bar_chart, whose grouped clusters are narrower with wider spaces between them, and every panel ofbar_variants. Both read well. No other figure changes.