diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 40b21ec02dc6..08d6cb3dd175 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -6240,7 +6240,14 @@ def contour(self, *args, **kwargs): contours = mcontour.QuadContourSet(self, *args, **kwargs) self._request_autoscale_view() return contours - contour.__doc__ = mcontour.QuadContourSet._contour_doc + contour.__doc__ = """ + Plot contour lines. + + Call signature:: + + contour([X, Y,] Z, [levels], **kwargs) + + """ + mcontour.QuadContourSet._contour_doc @_preprocess_data() def contourf(self, *args, **kwargs): @@ -6248,7 +6255,14 @@ def contourf(self, *args, **kwargs): contours = mcontour.QuadContourSet(self, *args, **kwargs) self._request_autoscale_view() return contours - contourf.__doc__ = mcontour.QuadContourSet._contour_doc + contourf.__doc__ = """ + Plot filled contours. + + Call signature:: + + contourf([X, Y,] Z, [levels], **kwargs) + + """ + mcontour.QuadContourSet._contour_doc def clabel(self, CS, levels=None, **kwargs): """ diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index c06621c272c3..d700beeee916 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -1555,11 +1555,6 @@ def _initialize_x_y(self, z): return np.meshgrid(x, y) _contour_doc = """ - Plot contours. - - Call signature:: - - contour([X, Y,] Z, [levels], **kwargs) `.contour` and `.contourf` draw contour lines and filled contours, respectively. Except as noted, function signatures and return values