commit 40632c7 explains that in PyPlot the "D"s in hist2D and the like are capitalized in PyPlot.
The pyplot wrapper requires capitalization, but when the function is called on/by an axis object, the opposite is true:
hist2D(...) # works
hist2d(...) # throws ERROR: UndefVarError: `hist2d` not defined in `Main`
fig, ax = plt.sublots()
ax.hist2D(...) # throws ERROR: KeyError: key :hist2D not found
ax.hist2d(...) # works