8000 Individualize contour and contourf docstrings · matplotlib/matplotlib@3d23b6e · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 3d23b6e

Browse files
committed
Individualize contour and contourf docstrings
Both use the same docstring from mcontour.QuadContourSet._contour_doc. At least make the summary line and call signatures explicit to be more clear.
1 parent 6c3d8da commit 3d23b6e

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,15 +6240,29 @@ def contour(self, *args, **kwargs):
62406240
contours = mcontour.QuadContourSet(self, *args, **kwargs)
62416241
self._request_autoscale_view()
62426242
return contours
6243-
contour.__doc__ = mcontour.QuadContourSet._contour_doc
6243+
contour.__doc__ = """
6244+
Plot contour lines.
6245+
6246+
Call signature::
6247+
6248+
contour([X, Y,] Z, [levels], **kwargs)
6249+
6250+
""" + mcontour.QuadContourSet._contour_doc
62446251

62456252
@_preprocess_data()
62466253
def contourf(self, *args, **kwargs):
62476254
kwargs['filled'] = True
62486255
contours = mcontour.QuadContourSet(self, *args, **kwargs)
62496256
self._request_autoscale_view()
62506257
return contours
6251-
contourf.__doc__ = mcontour.QuadContourSet._contour_doc
6258+
contourf.__doc__ = """
6259+
Plot filled contours.
6260+
6261+
Call signature::
6262+
6263+
contourf([X, Y,] Z, [levels], **kwargs)
6264+
6265+
""" + mcontour.QuadContourSet._contour_doc
62526266

62536267
def clabel(self, CS, levels=None, **kwargs):
62546268
"""

lib/matplotlib/contour.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,11 +1555,6 @@ def _initialize_x_y(self, z):
15551555
return np.meshgrid(x, y)
15561556

15571557
_contour_doc = """
1558-
Plot contours.
1559-
1560-
Call signature::
1561-
1562-
contour([X, Y,] Z, [levels], **kwargs)
15631558
15641559
`.contour` and `.contourf` draw contour lines and filled contours,
15651560
respectively. Except as noted, function signatures and return values

0 commit comments

Comments
 (0)
0