| 
6 | 6 | from numbers import Real  | 
7 | 7 | from operator import attrgetter  | 
8 | 8 | import re  | 
 | 9 | +import textwrap  | 
9 | 10 | import types  | 
10 | 11 | 
 
  | 
11 | 12 | import numpy as np  | 
@@ -3603,15 +3604,30 @@ def invert_xaxis(self):  | 
3603 | 3604 |         """  | 
3604 | 3605 |         Invert the x-axis.  | 
3605 | 3606 | 
  | 
 | 3607 | +        .. admonition:: Discouraged  | 
 | 3608 | +
  | 
 | 3609 | +            The use of this method is discouraged.  | 
 | 3610 | +            Use `.Axes.set_xinverted` instead.  | 
 | 3611 | +
  | 
3606 | 3612 |         See Also  | 
3607 | 3613 |         --------  | 
3608 |  | -        xaxis_inverted  | 
 | 3614 | +        get_xinverted  | 
3609 | 3615 |         get_xlim, set_xlim  | 
3610 | 3616 |         get_xbound, set_xbound  | 
3611 | 3617 |         """  | 
3612 | 3618 |         self.xaxis.set_inverted(not self.xaxis.get_inverted())  | 
3613 | 3619 | 
 
  | 
 | 3620 | +    set_xinverted = _axis_method_wrapper("xaxis", "set_inverted")  | 
 | 3621 | +    get_xinverted = _axis_method_wrapper("xaxis", "get_inverted")  | 
3614 | 3622 |     xaxis_inverted = _axis_method_wrapper("xaxis", "get_inverted")  | 
 | 3623 | +    if xaxis_inverted.__doc__:  | 
 | 3624 | +        xaxis_inverted.__doc__ += textwrap.dedent("""  | 
 | 3625 | +
  | 
 | 3626 | +        .. admonition:: Discouraged  | 
 | 3627 | +
  | 
 | 3628 | +            The use of this method is discouraged.  | 
 | 3629 | +            Use `.Axes.get_xinverted` instead.  | 
 | 3630 | +        """)  | 
3615 | 3631 | 
 
  | 
3616 | 3632 |     def get_xbound(self):  | 
3617 | 3633 |         """  | 
@@ -3856,15 +3872,30 @@ def invert_yaxis(self):  | 
3856 | 3872 |         """  | 
3857 | 3873 |         Invert the y-axis.  | 
3858 | 3874 | 
  | 
 | 3875 | +        .. admonition:: Discouraged  | 
 | 3876 | +
  | 
 | 3877 | +            The use of this method is discouraged.  | 
 | 3878 | +            Use `.Axes.set_yinverted` instead.  | 
 | 3879 | +
  | 
3859 | 3880 |         See Also  | 
3860 | 3881 |         --------  | 
3861 |  | -        yaxis_inverted  | 
 | 3882 | +        get_yinverted  | 
3862 | 3883 |         get_ylim, set_ylim  | 
3863 | 3884 |         get_ybound, set_ybound  | 
3864 | 3885 |         """  | 
3865 | 3886 |         self.yaxis.set_inverted(not self.yaxis.get_inverted())  | 
3866 | 3887 | 
 
  | 
 | 3888 | +    set_yinverted = _axis_method_wrapper("yaxis", "set_inverted")  | 
 | 3889 | +    get_yinverted = _axis_method_wrapper("yaxis", "get_inverted")  | 
3867 | 3890 |     yaxis_inverted = _axis_method_wrapper("yaxis", "get_inverted")  | 
 | 3891 | +    if yaxis_inverted.__doc__:  | 
 | 3892 | +        yaxis_inverted.__doc__ += textwrap.dedent("""  | 
 | 3893 | +
  | 
 | 3894 | +        .. admonition:: Discouraged  | 
 | 3895 | +
  | 
 | 3896 | +            The use of this method is discouraged.  | 
 | 3897 | +            Use `.Axes.get_yinverted` instead.  | 
 | 3898 | +        """)  | 
3868 | 3899 | 
 
  | 
3869 | 3900 |     def get_ybound(self):  | 
3870 | 3901 |         """  | 
 | 
0 commit comments