Description
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
andextent
in theContourSet
class hierarchy. Likely move toQuadContourSet
. But it might be that we have leave it inContourSet
but warn/error when used inTriContourSet
. - 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.