Skip to content

Feature/span cbar slot based - #688

Merged
cvanelteren merged 6 commits into
mainfrom
feature/span-cbar-slot-based
Apr 15, 2026
Merged

Feature/span cbar slot based#688
cvanelteren merged 6 commits into
mainfrom
feature/span-cbar-slot-based

Conversation

@cvanelteren

Copy link
Copy Markdown
Collaborator

Continuation of #681
Should close#678 properly

@cvanelteren
cvanelterenforce-pushed the feature/span-cbar-slot-based branch from 35d9d84 to e2d8175CompareApril 15, 2026 08:14
@cvanelteren
cvanelteren requested a review from gepcelApril 15, 2026 08:14
@codecov

codecovBot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.45645% with 36 lines in your changes missing coverage. Please review.

Files with missing linesPatch %Lines
ultraplot/axes/geo.py73.80%11 Missing and 11 partials ⚠️
ultraplot/axes/base.py68.18%8 Missing and 6 partials ⚠️

📢 Thoughts on this report? Let us know!

@gepcel

gepcel commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Doesn't seem to get the right height of GeoAxes. Try the following code:

import ultraplot as uplt
import numpy as np
fig, axs = uplt.subplots(nrows=2, ncols=2, proj=["npstere", "npstere", 'cyl','cyl'])
# fig, axs = uplt.subplots(nrows=2, ncols=2)
rng = np.random.default_rng()
data = rng.random((100, 100))
cm = axs[0, 0].pcolormesh(data)
fig.colorbar(cm, loc="r", ax=axs[0], ref=axs[1,0])
fig.colorbar(cm, loc="r", ax=axs[0], ref=axs[:,1])

@cvanelteren

Copy link
Copy Markdown
CollaboratorAuthor

You mean this is not looking correct:
test

Are you referring to how the bottom ones are reshaping to a different aspect?

@gepcel

Copy link
Copy Markdown
Collaborator
image

As ot mark ① has the same height of axs[1,0] when colorbar doesn't has span. but ② doesn't has the same height, with span.

@cvanelteren

Copy link
Copy Markdown
CollaboratorAuthor

I think this works. With the latest commit:

["npstere", "cyl", "cyl", "cyl"]: would adjust but
["npstere", "cyl", "cyl", None]: will not as the last line would have a plot that is longer.

@cvanelteren

cvanelteren commented Apr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Worst case we have this which I am ok with:
image

@cvanelteren

Copy link
Copy Markdown
CollaboratorAuthor

Will let this ruminate a bit to see if I can improve this -- it is a bit janky imo.

@cvanelterencvanelteren added the Wait Suspending current issue until further notice label Apr 15, 2026
@cvanelteren
cvanelteren merged commit d1cd3d4 into mainApr 15, 2026
19 checks passed
@cvanelteren
cvanelteren deleted the feature/span-cbar-slot-based branch April 15, 2026 23:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WaitSuspending current issue until further notice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request for colorbar support on geographic axes

2 participants

@cvanelteren@gepcel