Fix _parse_level_norm docstring to reflect conditional return type#600
Merged
cvanelteren merged 4 commits intofix/issue-329-contour-color-mappingfrom Feb 26, 2026
Merged
Conversation
…e return types Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
cvanelteren
approved these changes
Feb 26, 2026
Copilot
AI
changed the title
[WIP] Address feedback on contour level color mapping fix
Fix Feb 26, 2026
_parse_level_norm docstring to reflect conditional return type
bf1dd57
into
fix/issue-329-contour-color-mapping
1 of 2 checks passed
cvanelteren
added a commit
that referenced
this pull request
Feb 26, 2026
* Fix contour level color mapping with explicit limits * Update ultraplot/axes/plot.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix `_parse_level_norm` docstring to reflect conditional return type (#600) * Initial plan * Update _parse_level_norm docstring Returns section to reflect possible return types Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Casper van Elteren <caspervanelteren@gmail.com> Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com> * Scope explicit contour limits to line contours * Pass vmin/vmax through automatic level generation * Restore default tricontour discrete mapping * Format contour norm routing changes * Clarify contour norm routing docs * Refactor contour norm routing flow * Refactor contour norm routing flags --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Returnssection of_parse_level_normincorrectly declarednormas always returning aDiscreteNorm, but the function conditionally returns the original continuousNormalizewhenmin_levels=1(line contours) and the input norm is not aBoundaryNorm.Changes
ultraplot/axes/plot.py: Updated_parse_level_normdocstringReturnssection to document both possible return types:~ultraplot.colors.DiscreteNorm— standard case for filled contours~matplotlib.colors.Normalize— passthrough for line contours (min_levels=1) when input is not aBoundaryNorm🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.