You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Bug report
Bug summary
There doesn't appear a way to move colorbars up and down when using
colorbar.make_axes()
inconstrained_layout=True
mode. Theanchor
argument appears to be functionally ignored. (Note thatlocation
specifies left/right/top/bottom, whereasanchor
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
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)
.)The text was updated successfully, but these errors were encountered: