This is based on the issue #2411 that I originally posted in the altair repo.
The method for making layered histograms suggested on altair-viz.github.io seems to fail to take into account null values within the range of the data: bins that should be empty are represented as having 1 observation.
Issue
This is based on the issue #2411 that I originally posted in the
altair
repo.The method for making layered histograms suggested on altair-viz.github.io seems to fail to take into account null values within the range of the data: bins that should be empty are represented as having 1 observation.
Examples
Altair:
Solution
The suggested method should be
mark_bar
instead ofmark_area
, which correctly represents the data. I'll be doing a PR shortly.The underlying issue with
mark_area
still needs fixing however: here's how it looks in Seaborn:Should I open the issue in https://github.com/vega/vega-lite?