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

❌ Patch coverage is 90.00000% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/figure.py 71.42% 4 Missing and 4 partials ⚠️
ultraplot/tests/test_legend.py 95.65% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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

2 participants