@@ -2019,26 +2019,30 @@ def axis(self, arg=None, /, *, emit=True, **kwargs):
20192019 If a bool, turns axis lines and labels on or off. If a string,
20202020 possible values are:
20212021
2022- ======== ==========================================================
2023- Value Description
2024- ======== ==========================================================
2025- 'on' Turn on axis lines and labels. Same as ``True``.
2026- 'off' Turn off axis lines and labels. Same as ``False``.
2027- 'equal' Set equal scaling (i.e., make circles circular) by
2028- changing axis limits. This is the same as
2029- ``ax.set_aspect('equal', adjustable='datalim')``.
2030- Explicit data limits may not be respected in this case.
2031- 'scaled' Set equal scaling (i.e., make circles circular) by
2032- changing dimensions of the plot box. This is the same as
2033- ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
2034- Additionally, further autoscaling will be disabled.
2035- 'tight' Set limits just large enough to show all data, then
2036- disable further autoscaling.
2037- 'auto' Automatic scaling (fill plot box with data).
2038- 'image' 'scaled' with axis limits equal to data limits.
2039- 'square' Square plot; similar to 'scaled', but initially forcing
2040- ``xmax-xmin == ymax-ymin``.
2041- ======== ==========================================================
2022+ ================ ===========================================================
2023+ Value Description
2024+ ================ ===========================================================
2025+ 'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
2026+ tick marks, tick labels, and grid lines.
2027+ This is the same as `~.Axes.set_axis_off()`.
2028+ 'on' or `True` Do not hide all axis decorations, i.e. axis labels, spines,
2029+ tick marks, tick labels, and grid lines.
2030+ This is the same as `~.Axes.set_axis_on()`.
2031+ 'equal' Set equal scaling (i.e., make circles circular) by
2032+ changing the axis limits. This is the same as
2033+ ``ax.set_aspect('equal', adjustable='datalim')``.
2034+ Explicit data limits may not be respected in this case.
2035+ 'scaled' Set equal scaling (i.e., make circles circular) by
2036+ changing dimensions of the plot box. This is the same as
2037+ ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
2038+ Additionally, further autoscaling will be disabled.
2039+ 'tight' Set limits just large enough to show all data, then
2040+ disable further autoscaling.
2041+ 'auto' Automatic scaling (fill plot box with data).
2042+ 'image' 'scaled' with axis limits equal to data limits.
2043+ 'square' Square plot; similar to 'scaled', but initially forcing
2044+ ``xmax-xmin == ymax-ymin``.
2045+ ================ ===========================================================
20422046
20432047 emit : bool, default: True
20442048 Whether observers are notified of the axis limit change.
@@ -3391,18 +3395,25 @@ def tick_params(self, axis='both', **kwargs):
33913395
33923396 def set_axis_off (self ):
33933397 """
3394- Turn the x- and y-axis off .
3398+ Hide all visual components of the x- and y-axis.
33953399
3396- This affects the axis lines, ticks, ticklabels, grid and axis labels.
3400+ This sets a flag to suppress drawing of all axis decorations, i.e.
3401+ axis labels, axis spines, and the axis tick component (tick markers,
3402+ tick labels, and grid lines). Individual visibility settings of these
3403+ components are ignored as long as `set_axis_off()` is in effect.
33973404 """
33983405 self .axison = False
33993406 self .stale = True
34003407
34013408 def set_axis_on (self ):
34023409 """
3403- Turn the x- and y-axis on .
3410+ Do not hide all visual components of the x- and y-axis.
34043411
3405- This affects the axis lines, ticks, ticklabels, grid and axis labels.
3412+ This reverts the effect of a prior `.set_axis_off()` call. Whether the
3413+ individual axis decorations are drawn is controlled by their respective
3414+ visibility settings.
3415+
3416+ This is on by default.
34063417 """
34073418 self .axison = True
34083419 self .stale = True
@@ -3649,7 +3660,8 @@ def set_xlim(self, left=None, right=None, *, emit=True, auto=False,
36493660 get_xscale = _axis_method_wrapper ("xaxis" , "get_scale" )
36503661 set_xscale = _axis_method_wrapper ("xaxis" , "_set_axes_scale" )
36513662 get_xticks = _axis_method_wrapper ("xaxis" , "get_ticklocs" )
3652- set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" )
3663+ set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" ,
3664+ doc_sub = {'set_ticks' : 'set_xticks' })
36533665 get_xmajorticklabels = _axis_method_wrapper ("xaxis" , "get_majorticklabels" )
36543666 get_xminorticklabels = _axis_method_wrapper ("xaxis" , "get_minorticklabels" )
36553667 get_xticklabels = _axis_method_wrapper ("xaxis" , "get_ticklabels" )
@@ -3880,7 +3892,8 @@ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False,
38803892 get_yscale = _axis_method_wrapper ("yaxis" , "get_scale" )
38813893 set_yscale = _axis_method_wrapper ("yaxis" , "_set_axes_scale" )
38823894 get_yticks = _axis_method_wrapper ("yaxis" , "get_ticklocs" )
3883- set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" )
3895+ set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" ,
3896+ doc_sub = {'set_ticks' : 'set_yticks' })
38843897 get_ymajorticklabels = _axis_method_wrapper ("yaxis" , "get_majorticklabels" )
38853898 get_yminorticklabels = _axis_method_wrapper ("yaxis" , "get_minorticklabels" )
38863899 get_yticklabels = _axis_method_wrapper ("yaxis" , "get_ticklabels" )
0 commit comments