Skip to content

[MNT]: Inline ContourLabeler into ContourSet #31793

@timhoffm

Description

@timhoffm

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions