Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature: figure semantic legends#707

Merged
cvanelteren merged 4 commits into
mainUltraplot/UltraPlot:mainfrom
feature/fig-semantic-legendUltraplot/UltraPlot:feature/fig-semantic-legendCopy head branch name to clipboard
May 12, 2026
Merged

Feature: figure semantic legends#707
cvanelteren merged 4 commits into
mainUltraplot/UltraPlot:mainfrom
feature/fig-semantic-legendUltraplot/UltraPlot:feature/fig-semantic-legendCopy head branch name to clipboard

Conversation

@cvanelteren

Copy link
Copy Markdown
Collaborator

Closes #706

This exposes the public API for adding semantic legends to the figure class. This PR is a shallow pass however.

Currently UltraPlot has an awkward split on the semantic legends under UltraLegend and the actual thin matplotlib wrapper for the implementation of the legend under Legend. A future refactor would need to integrate these two either through composition to reduce the overhead. It ties closely into a general refactor for the Figure class in general but is important to note regardless.

A follow-up refactor should separate semantic legend content generation from legend placement and rendering. The likely direction is a composition-based design with target-agnostic builders that return (handles, labels), and thin Axes and Figure adapters that place those legends through their respective public APIs.

@cvanelteren cvanelteren requested review from beckermr and gepcel April 29, 2026 20:36
@codecov

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.82609% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/figure.py 96.82% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren

Copy link
Copy Markdown
Collaborator Author

Merging this as the feature is small. Hope you are still interested to maintaining this package long-term @beckermr.

@cvanelteren cvanelteren merged commit dd74cd0 into main May 12, 2026
18 checks passed
@cvanelteren cvanelteren deleted the feature/fig-semantic-legend branch May 12, 2026 05:35
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.

Figure wide semantic legends

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.