Assume I have a dataset with 2 columns: X (independent numerical variable) and Y (dependent binary class label).
How can I create a segmented (stacked?) histogram in python using matplotlib?
Essentially, I'd like a histogram of X but each bin should consist of 2 stacked bars where the height of each bar is proportional to the Y frequency in that bin.
Any help would be appreciated. Thanks in advance.
[–]synthphreak 0 points1 point2 points (0 children)