You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing a so.Hist(common_bins=False), if the bins for each group overlap, the width calculated for each mark is smaller that it should be.
Here's a minimal working example, where I have a dataset A, and its x-shifted version B = A + shift. In each row, I'm plotting a different shift, and when they start overlapping, the bar width is smaller than the bin width.
If the bin edges are [0, 1, 2] and [0.5, 1.5, 2.5] for each group, it calculates the bin width from [0, 0.5, 1, 1.5, ...] and finds a width of 0.5 instead of a width of 1.
Maybe this is not a bug but something by design when there is overlap between marks?
In case it is a bug, I could contribute a fix, but would probably need some direction as to where to fix it.
Thanks!
The text was updated successfully, but these errors were encountered:
When doing a
so.Hist(common_bins=False)
, if the bins for each group overlap, the width calculated for each mark is smaller that it should be.Here's a minimal working example, where I have a dataset
A
, and its x-shifted versionB = A + shift
. In each row, I'm plotting a different shift, and when they start overlapping, the bar width is smaller than the bin width.I could trace it to this width calculation:
seaborn/seaborn/_core/plot.py
Line 1453 in b4e5f8d
which ends up running the following line for all groups as one:
seaborn/seaborn/_core/scales.py
Line 467 in b4e5f8d
If the bin edges are
[0, 1, 2]
and[0.5, 1.5, 2.5]
for each group, it calculates the bin width from[0, 0.5, 1, 1.5, ...]
and finds a width of 0.5 instead of a width of 1.Maybe this is not a bug but something by design when there is overlap between marks?
In case it is a bug, I could contribute a fix, but would probably need some direction as to where to fix it.
Thanks!
The text was updated successfully, but these errors were encountered: