GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move contour labeling methods into ContourSet by sahilmathur254 · Pull Request #32579 · matplotlib/matplotlib

Conversation

@sahilmathur254

@sahilmathur254 sahilmathur254 commented Nov 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

PR summary

ContourLabeler provides labelling functionality solely for ContourSet, yet the separate mixin complicates documentation and relies on attributes defined by ContourSet. This PR consolidates the methods and type annotations within ContourSet and removes the mixin directly, following the maintainer’s guidance. Documentation and API removal notes are updated, with focused tests and before-and-after comparisons supporting preservation of existing labelling behaviour.

Direct removal follows the maintainer’s confirmation.

Closes #31793.

AI Disclosure

Codex assisted with the code changes, regression coverage, and validation in isolated Docker environments. The PR description was also drafted with AI assistance, and this PR was submitted by Codex with the contributor’s explicit authorisation.

Local validation

  • Contour and triangulation test modules: 161 passed, 4 skipped, both before and after the refactor. The skips were two PDF comparisons requiring Ghostscript and two SVG comparisons requiring Inkscape.
  • A local comparison across 24 labelling cases produced identical rendered pixels, label text, positions, rotations, and contour paths before and after the change. This covered direct, regular-grid, and triangular contours, automatic/manual placement, inline labels, and use_clabeltext.
  • Ruff and the repository-configured codespell check passed on the changed files.
  • Mypy passed for all 108 source files in an environment using the CI build and typing dependency groups. The focused contour runtime/stub comparison also passed.
  • A focused Sphinx build of the contour API page, Axes.clabel, and the removal note passed with warnings treated as errors. Links to unrelated guide pages were outside this focused check; the updated labeling links and method anchors were verified.
  • Four broken references in historical API notes were reproduced with a nitpicky Sphinx build and corrected to code literals; the same build then passed without warnings.

The full test suite and full documentation site were not run locally. GitHub CI results are available in the PR checks.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [N/A] Plotting related features are demonstrated in an example — this consolidates existing labeling functionality.
  • New features and API changes have release notes
  • Documentation complies with general and docstring guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sahilmathur254
Move contour labeling methods into ContourSet
a9c01c7
@github-actions github-actions Bot added the topic: contour label Nov 7, 2026
sahilmathur254 added 2 commits November 7, 2026 12:54
@sahilmathur254
Use PR number in contour API removal note
f839540
@sahilmathur254
Fix historical references to removed ContourLabeler
bede5c6
@sahilmathur254
sahilmathur254 marked this pull request as ready for review November 7, 2026 07:40

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic: contour

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[MNT]: Inline ContourLabeler into ContourSet

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@sahilmathur254
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.