seaborn icon indicating copy to clipboard operation
seaborn copied to clipboard

Width computation after histogram slightly wrong with log scale

Open mwaskom opened this issue 2 years ago • 0 comments

Note the slight overlap here:

(
    so.Plot(tips, "total_bill")
    .add(so.Bars(alpha=.3, edgewidth=0), so.Hist(bins=4))
    .scale(x="log")
)

image

It becomes nearly imperceptible with more bins:

(
    so.Plot(tips, "total_bill")
    .add(so.Bars(alpha=.3, edgewidth=0), so.Hist(bins=8))
    .scale(x="log")
)

image

This is not about Bars; Bar has it too:

(
    so.Plot(tips, "total_bill")
    .add(so.Bar(alpha=.3, edgewidth=0, width=1), so.Hist(bins=4))
    .scale(x="log")
)

image

mwaskom avatar Jul 14 '22 11:07 mwaskom