Uh oh!
There was an error while loading. Please reload this page.
Allow colorbars to attach to inset axes - #738
Conversation
Colorbars requested on inset axes with side locations now stay attached to the inset instead of trying to allocate a subplot panel, which fails for axes without a subplot spec. The change remaps side requests to inset colorbar placements with side-appropriate default orientations and adds a regression test covering both direct inset-axis calls and figure-level calls that target an inset axis.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
gepcel
left a comment
There was a problem hiding this comment.
I haven't had time to test this yet—don't let me hold up the process.
cvanelteren
commented
Jun 21, 2026
There is no rush @gepcel |
cvanelteren
commented
Jun 23, 2026
I will merge it by Friday if I don't here anything fyi @gepcel if you have time before to test stuff then would love to get your feedback. |
| def _get_side_colorbar_ticklocation(side, orientation, tickloc, ticklocation): | ||
| """Return the outward-facing tick location for a side colorbar.""" | ||
| if orientation == "horizontal": | ||
| default = "top" if side == "top" else "bottom" |
There was a problem hiding this comment.
If orientation is horizontal, I think the default should be "bottom".
There was a problem hiding this comment.
Because both ultraplot and matplotlib use bottom as default position for horizontal colorbar. Other than this, I'm ok with this.
There was a problem hiding this comment.
ah good catch will do that.
There was a problem hiding this comment.
You can merge when you think it's ready. This is an execellent feature.
Uh oh!
There was an error while loading. Please reload this page.
cvanelteren
commented
Jun 23, 2026
Thanks @gepcel |

Closes#737
Colorbars requested on inset axes with side locations now stay attached to the inset instead of trying to allocate a subplot panel, which fails for axes without a subplot spec. The change remaps side requests to inset colorbar placements with side-appropriate default orientations and adds a regression test covering both direct inset-axis calls and figure-level calls that target an inset axis.