@@ -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.
@@ -3423,18 +3427,25 @@ def tick_params(self, axis='both', **kwargs):
34233427
34243428 def set_axis_off (self ):
34253429 """
3426- Turn the x- and y-axis off .
3430+ Hide all visual components of the x- and y-axis.
34273431
3428- This affects the axis lines, ticks, ticklabels, grid and axis labels.
3432+ This sets a flag to suppress drawing of all axis decorations, i.e.
3433+ axis labels, axis spines, and the axis tick component (tick markers,
3434+ tick labels, and grid lines). Individual visibility settings of these
3435+ components are ignored as long as `set_axis_off()` is in effect.
34293436 """
34303437 self .axison = False
34313438 self .stale = True
34323439
34333440 def set_axis_on (self ):
34343441 """
3435- Turn the x- and y-axis on .
3442+ Do not hide all visual components of the x- and y-axis.
34363443
3437- This affects the axis lines, ticks, ticklabels, grid and axis labels.
3444+ This reverts the effect of a prior `.set_axis_off()` call. Whether the
3445+ individual axis decorations are drawn is controlled by their respective
3446+ visibility settings.
3447+
3448+ This is on by default.
34383449 """
34393450 self .axison = True
34403451 self .stale = True
@@ -3681,7 +3692,8 @@ def set_xlim(self, left=None, right=None, *, emit=True, auto=False,
36813692 get_xscale = _axis_method_wrapper ("xaxis" , "get_scale" )
36823693 set_xscale = _axis_method_wrapper ("xaxis" , "_set_axes_scale" )
36833694 get_xticks = _axis_method_wrapper ("xaxis" , "get_ticklocs" )
3684- set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" )
3695+ set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" ,
3696+ doc_sub = {'set_ticks' : 'set_xticks' })
36853697 get_xmajorticklabels = _axis_method_wrapper ("xaxis" , "get_majorticklabels" )
36863698 get_xminorticklabels = _axis_method_wrapper ("xaxis" , "get_minorticklabels" )
36873699 get_xticklabels = _axis_method_wrapper ("xaxis" , "get_ticklabels" )
@@ -3912,7 +3924,8 @@ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False,
39123924 get_yscale = _axis_method_wrapper ("yaxis" , "get_scale" )
39133925 set_yscale = _axis_method_wrapper ("yaxis" , "_set_axes_scale" )
39143926 get_yticks = _axis_method_wrapper ("yaxis" , "get_ticklocs" )
3915- set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" )
3927+ set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" ,
3928+ doc_sub = {'set_ticks' : 'set_yticks' })
39163929 get_ymajorticklabels = _axis_method_wrapper ("yaxis" , "get_majorticklabels" )
39173930 get_yminorticklabels = _axis_method_wrapper ("yaxis" , "get_minorticklabels" )
39183931 get_yticklabels = _axis_method_wrapper ("yaxis" , "get_ticklabels" )
0 commit comments