Bug report
Bug summary
There doesn't appear a way to move colorbars up and down when using colorbar.make_axes() in constrained_layout=True mode. The anchor argument appears to be functionally ignored. (Note that location specifies left/right/top/bottom, whereas anchor should move the colorbar within the specified location, eg if the default location of right is chosen, anchor allows moving the colorbar to the top or bottom.)
This appears to be an incomplete implementation of the constrained_layout.layoutcolorbargridspec function, called from here:
https://github.com/matplotlib/matplotlib/blob/c8b92926a880163394e3bd7f56220b65df71646c/lib/matplotlib/_constrained_layout.py
Please let me know if I'm missing something or if there's a workaround.
Code for reproduction
fig, ax = plt.subplots(constrained_layout=True)
ax.scatter(np.arange(100), np.arange(100), c=np.arange(100))
cax, _ = matplotlib.colorbar.make_axes(ax, shrink=0.5, anchor=(0.0, 1.0))
cbar = matplotlib.colorbar.ColorbarBase(cax)
Actual outcome
With constrained_layout=True:

Expected outcome
With constrained_layout=True, the anchor argument is honored:

(Note that the colorbar has moved to the top, as expected given the anchor=(0, 1.0).)
Bug report
Bug summary
There doesn't appear a way to move colorbars up and down when using
colorbar.make_axes()inconstrained_layout=Truemode. Theanchorargument appears to be functionally ignored. (Note thatlocationspecifies left/right/top/bottom, whereasanchorshould move the colorbar within the specified location, eg if the default location of right is chosen, anchor allows moving the colorbar to the top or bottom.)This appears to be an incomplete implementation of the
constrained_layout.layoutcolorbargridspecfunction, called from here:https://github.com/matplotlib/matplotlib/blob/c8b92926a880163394e3bd7f56220b65df71646c/lib/matplotlib/_constrained_layout.py
Please let me know if I'm missing something or if there's a workaround.
Code for reproduction
Actual outcome
With

constrained_layout=True:Expected outcome
With

constrained_layout=True, the anchor argument is honored:(Note that the colorbar has moved to the top, as expected given the
anchor=(0, 1.0).)