@@ -2019,26 +2019,30 @@ def axis(self, arg=None, /, *, emit=True, **kwargs):
2019
2019
If a bool, turns axis lines and labels on or off. If a string,
2020
2020
possible values are:
2021
2021
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
+ 'on' or `True` Do not hide all axis decorations, i.e. axis labels, spines,
2026
+ tick marks, tick labels, and girds.
2027
+ This is the same as `~.Axes.set_axis_on()`.
2028
+ 'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
2029
+ tick marks, tick labels, and girds.
2030
+ This is the same as `~.Axes.set_axis_off()`.
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
+ ================ ===========================================================
2042
2046
2043
2047
emit : bool, default: True
2044
2048
Whether observers are notified of the axis limit change.
@@ -3423,18 +3427,25 @@ def tick_params(self, axis='both', **kwargs):
3423
3427
3424
3428
def set_axis_off (self ):
3425
3429
"""
3426
- Turn the x- and y-axis off .
3430
+ Hide all visual components of the x- and y-axis.
3427
3431
3428
- This affects the axis lines, ticks, ticklabels, grid and axis labels.
3432
+ This is an Axes-wide setting 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.
3429
3436
"""
3430
3437
self .axison = False
3431
3438
self .stale = True
3432
3439
3433
3440
def set_axis_on (self ):
3434
3441
"""
3435
- Turn the x- and y-axis on .
3442
+ Do not hide all visual components of the x- and y-axis.
3436
3443
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.
3438
3449
"""
3439
3450
self .axison = True
3440
3451
self .stale = True
@@ -3681,7 +3692,8 @@ def set_xlim(self, left=None, right=None, *, emit=True, auto=False,
3681
3692
get_xscale = _axis_method_wrapper ("xaxis" , "get_scale" )
3682
3693
set_xscale = _axis_method_wrapper ("xaxis" , "_set_axes_scale" )
3683
3694
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' })
3685
3697
get_xmajorticklabels = _axis_method_wrapper ("xaxis" , "get_majorticklabels" )
3686
3698
get_xminorticklabels = _axis_method_wrapper ("xaxis" , "get_minorticklabels" )
3687
3699
get_xticklabels = _axis_method_wrapper ("xaxis" , "get_ticklabels" )
@@ -3912,7 +3924,8 @@ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False,
3912
3924
get_yscale = _axis_method_wrapper ("yaxis" , "get_scale" )
3913
3925
set_yscale = _axis_method_wrapper ("yaxis" , "_set_axes_scale" )
3914
3926
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' })
3916
3929
get_ymajorticklabels = _axis_method_wrapper ("yaxis" , "get_majorticklabels" )
3917
3930
get_yminorticklabels = _axis_method_wrapper ("yaxis" , "get_minorticklabels" )
3918
3931
get_yticklabels = _axis_method_wrapper ("yaxis" , "get_ticklabels" )
0 commit comments