Skip to content

Conversation

@cvanelteren
Copy link
Collaborator

Add gallery plots of a curated selection of subplots

Closes #456
image

Includes:
- Configuration updates in conf.py for sphinx-gallery
- New gallery examples in docs/examples/
- Updates to documentation styling (custom.css/js) and index.rst
Replaced 'div=True' with 'diverging=True' as 'div' is not a supported alias in pcolormesh kwargs.
@cvanelteren cvanelteren marked this pull request as draft January 13, 2026 22:21
cvanelteren

This comment was marked as outdated.

@cvanelteren

This comment was marked as resolved.

* Fix legend span inference with panels

Legend span inference used panel-inflated indices after prior legends added panel rows/cols, yielding invalid gridspec indices for list refs.

Decode subplot indices to non-panel grid before computing span and add regression tests for multi-legend ordering.

* Restore tests

* Document legend span decode fallback

Add a brief note that decoding panel indices can fail for panel or nested subplot specs, so we fall back to raw indices.

* Add legend span/selection regression tests

Cover best-axis selection for left/right/top/bottom and the decode-index fallback path to raise coverage around Figure.legend panel inference.

* Extend legend coverage for edge ref handling

Add tests that cover span inference with invalid ref entries, best-axis fallback on inset locations, and the empty-iterable ref fallback path.
Includes:
- Configuration updates in conf.py for sphinx-gallery
- New gallery examples in docs/examples/
- Updates to documentation styling (custom.css/js) and index.rst
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cvanelteren
Copy link
Collaborator Author

I added a gallery to the docs and did some behind the scenes fixes.

Just have a look at https://ultraplot--465.org.readthedocs.build/en/465/gallery/index.html
Can you guys give a go ahead for this @gepcel @beckermr ?

@cvanelteren cvanelteren marked this pull request as ready for review January 15, 2026 07:13
@cvanelteren
Copy link
Collaborator Author

There is a bug in the shared labels but that is unrelated to the gallery -- I am trying to fix this now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a warning message about GeoAxes can only be shared for rectilinear projections. Are we keeping the warn here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah fair point, would need to disable the sharing for that subplot -- thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also two warning message Got conflicting or duplicate keyword arguments: {'colors': 'C1', 'color': (0.0, 0.4470588235294118, 0.6980392156862745, 1.0)}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chart doesn't look very aesthetic. Don't you think the lines and arrows are a bit too thick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add gallery to docs

3 participants