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 — [MNT]: Inline ContourLabeler into ContourSet · Issue #31793 · matplotlib/matplotlib

[MNT]: Inline ContourLabeler into ContourSet #31793

New issue
Copy link
New issue
Copy link
Open
#32579
Open
[MNT]: Inline ContourLabeler into ContourSet#31793
#32579
Copy link
Labels
Maintenancestatus: needs comment/discussionneeds consensus on next stepneeds consensus on next step

Description

@timhoffm
timhoffm
opened on May 31, 2026
Issue body actions

Summary

ContourLabeler is a mixin designed to add labeling functionality to ContourSet. It is only used there and due to heavy dependence on ContourSet API unlikely to be usable anywhere else.

Having this part of the ContourSet functionality split up makes documentation more complex (two classes) and makes tools complain about unresolvable attributes when we rely on ContourSet attributes from within ContourLabeler.

Proposed fix

I propose to inline all ContourLabeler functions into ContourSet and remove ContourLabler.

While this is technically a breaking change, I don't think there is anybody relying on ContourLabeler explicitly. It's too special to be usable anywhere else and search also did not indicate any usage
https://github.com/search?q=%2F%5CbContourLabeler%5Cb%2F+language%3APython+NOT+is%3Afork+NOT+path%3A**%2Fmatplotlib%2F**+NOT+path%3A**%2Fsite-packages%2F**+NOT+path%3Acontour.py&type=code

Reacted by Ruth Comer

Activity

  1. timhoffm
    added
    Maintenance
    status: needs comment/discussionneeds consensus on next stepneeds consensus on next step
    on May 31, 2026
  2. sahilmathur254 commented on Nov 4, 2026

    @sahilmathur254
    sahilmathur254
    on Nov 4, 2026
    Contributor
    More actions

    I’d be interested in taking this on. I’d move the labelling methods into ContourSet, update the affected references and documentation, and run the contour-labeling tests to check that behaviour is preserved.

    Before starting, could we confirm the compatibility approach? Are you comfortable removing ContourLabeler directly as proposed, or would you prefer a compatibility path through the usual deprecation process? I’ll keep the change focused on this consolidation.

    Reacted by Tim Hoffmann
  3. timhoffm commented on Nov 5, 2026

    @timhoffm
    timhoffm
    on Nov 5, 2026
    MemberAuthor
    More actions

    I think we can dare to remove ContourLabeler directly.

  4. sahilmathur254 commented on Nov 5, 2026

    @sahilmathur254
    sahilmathur254
    on Nov 5, 2026
    Contributor
    More actions

    Thanks @timhoffm, that clarifies it. I’ll move the labelling methods into ContourSet and remove ContourLabeler, update the affected documentation and references, and run the contour-labeling tests to check that behaviour is preserved

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Maintenancestatus: needs comment/discussionneeds consensus on next stepneeds consensus on next step

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.