From 0d8ec10dbd325572a46612a0dcd33ba53bb992d3 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 18 Sep 2023 23:49:54 +0200 Subject: [PATCH] Fix doc build Attempt to fix doc build failure introduced with #25272. I suspect this is sphinx scoping: #25272 reused methods like `Axes.set_xbounds` to generate documentation for Axes3D. However, a see also of invert_xaxis only searches within the same module (or class), and invert_xaxis is not documented for Axes3D. This PR broadens the search scope by using the leading dot. An alternative may be to attempt to explicitly document the missing methods for Axes3D. --- lib/matplotlib/axes/_base.py | 8 ++++---- lib/mpl_toolkits/mplot3d/axes3d.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index f9c3c25bbff5..8220f15fbf74 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3534,7 +3534,7 @@ def get_xbound(self): -------- set_xbound get_xlim, set_xlim - invert_xaxis, xaxis_inverted + .invert_xaxis, .xaxis_inverted """ left, right = self.get_xlim() if left < right: @@ -3561,7 +3561,7 @@ def set_xbound(self, lower=None, upper=None): -------- get_xbound get_xlim, set_xlim - invert_xaxis, xaxis_inverted + .invert_xaxis, .xaxis_inverted """ if upper is None and np.iterable(lower): lower, upper = lower @@ -3787,7 +3787,7 @@ def get_ybound(self): -------- set_ybound get_ylim, set_ylim - invert_yaxis, yaxis_inverted + .invert_yaxis, .yaxis_inverted """ bottom, top = self.get_ylim() if bottom < top: @@ -3814,7 +3814,7 @@ def set_ybound(self, lower=None, upper=None): -------- get_ybound get_ylim, set_ylim - invert_yaxis, yaxis_inverted + .invert_yaxis, .yaxis_inverted """ if upper is None and np.iterable(lower): lower, upper = lower diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index c519bc656533..087bc067846a 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -860,7 +860,7 @@ def set_xlim(self, left=None, right=None, *, emit=True, auto=False, -------- get_xlim set_xbound, get_xbound - invert_xaxis, xaxis_inverted + .invert_xaxis, .xaxis_inverted Notes ----- @@ -932,7 +932,7 @@ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False, -------- get_ylim set_ybound, get_ybound - invert_yaxis, yaxis_inverted + .invert_yaxis, .yaxis_inverted Notes -----