Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be8430b

Browse filesBrowse 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 be8430b
Copy full SHA for be8430b

File tree

Expand file treeCollapse file tree

2 files changed

+16
-7
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-7
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+16-2Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/contour.py
-5Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.