Bug report
Bug summary
I'm not really sure what align=left/right is even supposed to mean for uneven bins, but at least histype=bar/stepfilled should interpret them in the same manner (or both should error out).
Code for reproduction
from pylab import *
np.random.seed(0)
t = np.random.rand(100)
fig, axs = plt.subplots(3, 2, sharex=True, sharey=True)
for i, align in enumerate(["left", "mid", "right"]):
for j, ht in enumerate(["bar", "stepfilled"]):
axs[i, j].hist(t, [0, 1/4, 1], histtype=ht, align=align)
axs[i, j].set(xlabel=f"histtype={ht!r}", ylabel=f"align={align!r}")
axs[i, j].label_outer()
plt.show()
Actual outcome

Expected outcome
Either consistent plots with both histtypes, or an error indicating that align=left/right is incompatible with uneven bins.
Matplotlib version
- Operating system:
- Matplotlib version: master
- Matplotlib backend (
print(matplotlib.get_backend())):
- Python version:
- Jupyter version (if applicable):
- Other libraries:
Noted while thinking about #12493.
Bug report
Bug summary
I'm not really sure what align=left/right is even supposed to mean for uneven bins, but at least histype=bar/stepfilled should interpret them in the same manner (or both should error out).
Code for reproduction
Actual outcome
Expected outcome
Either consistent plots with both histtypes, or an error indicating that align=left/right is incompatible with uneven bins.
Matplotlib version
print(matplotlib.get_backend())):Noted while thinking about #12493.