Skip to content

[MNT]: Remove origin and extents parameters from tricontour[f]() #24006

Open
@timhoffm

Description

@timhoffm

Summary

from: #23995 (comment)

tricontour[f] documents and accepts parameters origin and extent, but interestingly, they are not used 😲. They are only used in contour[f], where one can leave out X and Y, in which case origin and extent define where to place the data in the Axes. When one thinks about it, this concept does obviously does not apply to triangular grids. One always has to specify x and y, either directly or via a `Triangulation.

It's a bit hard to see that origin and extent are unused, because they are passed through multiple levels of kwargs and are added as attributes to ContourSet, which is the common base class of TriContourSet and QuadContourSet. But TriContourSet does not use them. One can also check this by removing the validation checks on these values and then passing in nonsense values: The plot does not care. It seems this docstring part was copied from contour[f] without thinking about it.

Proposed fix

Goal: Remove origin and extents parameters from tricontour[f]()

Things to do:

  • Find out the how to properly handle origin and extent in the ContourSet class hierarchy. Likely move to QuadContourSet. But it might be that we have leave it in ContourSet but warn/error when used in TriContourSet.
  • Based on that determine the proper place to deprecate them.
  • Change the tricontour[f] docstring accordingly (deprecation statement and mention that they don't have any effect).
  • When the deprecation expires, clean up.

Note: Nobody has complained that these parameters don't have any effect, so I assume nobody uses them intentionally. But since they are documented, I think we still have to jump the deprecation hoops.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions