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
{{ message }}
Repository navigation
Feature request for colorbar support on geographic axes #678
I am using the Ultraplot library to create a 2×2 grid of subplots. The first row consists of geographic axes, while the second row contains regular (non-geographic) axes.
I created a colorbar for the geographic plots, but I would like to position the colorbar between the two rows of subplots, spanning across both columns.
However, in my attempts, the colorbar always appears below the first subplot instead of being centered between the two rows.
How can I correctly place the colorbar in the middle between the two rows and have it span across the columns?
From my read, I think the implementation is not at the level that GeoAxes can see the implementation. Tried running the code also thinking this would work but ran into an issue with my env and then didn't have time to look at it.
@gepcel that's strange. I found the culprit locally. I am not tracing where I made the mistake. THe issue is caused by forcing the colorbar to the width of the parent.
Just want to leave a note here: pr #681 doesn't actually close this issue. It just fix a regresstion that spanning colorbar should work since pr 394, but stopped working somehow. From what I test, spanning colorbar works again for default projection, but not for "npstere" like this example.
Activity
cvanelteren commentedon Apr 13, 2026
Yeah no problemo!
gepcel commentedon Apr 13, 2026
Have pr #394 stopped working?
cvanelteren commentedon Apr 13, 2026
From my read, I think the implementation is not at the level that GeoAxes can see the implementation. Tried running the code also thinking this would work but ran into an issue with my env and then didn't have time to look at it.
gepcel commentedon Apr 14, 2026
It may not be an issue with GeoAxes. I tried it briefly and it doesn't work under normal conditions either
cvanelteren commentedon Apr 14, 2026
@gepcel that's strange. I found the culprit locally. I am not tracing where I made the mistake. THe issue is caused by forcing the colorbar to the width of the parent.
I think it was caused by commit #58996bd1
gepcel commentedon Apr 15, 2026
Just want to leave a note here: pr #681 doesn't actually close this issue. It just fix a regresstion that spanning colorbar should work since pr 394, but stopped working somehow. From what I test, spanning colorbar works again for default projection, but not for "npstere" like this example.
cvanelteren commentedon Apr 15, 2026
Ah I see. I think this is tricky as the projection is not rectilinear -- need to think about how to deal with that logic.
lwq-star commentedon Apr 15, 2026
It is also ineffective for the default projection.
gepcel commentedon Apr 15, 2026
Hah, as of "default projection", I mean:
fig, axs = uplt.subplots(nrows=2, ncols=2).