8000 Merge pull request #20339 from anntzer/asd · matplotlib/matplotlib@bcc1ce8 · GitHub
[go: up one dir, main page]

Skip to content

Commit bcc1ce8

Browse files
authored
Merge pull request #20339 from anntzer/asd
Cleanup autoscale-related docstrings.
2 parents 078214a + f8b3cf1 commit bcc1ce8

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,27 +2540,21 @@ def in_axes(self, mouseevent):
25402540
return self.patch.contains(mouseevent)[0]
25412541

25422542
def get_autoscale_on(self):
2543-
"""
2544-
Get whether autoscaling is applied for both axes on plot commands
2545-
"""
2543+
"""Return True if each axis is autoscaled, False otherwise."""
25462544
return self._autoscaleXon and self._autoscaleYon
25472545

25482546
def get_autoscalex_on(self):
2549-
"""
2550-
Get whether autoscaling for the x-axis is applied on plot commands
2551-
"""
2547+
"""Return whether the x-axis is autoscaled."""
25522548
return self._autoscaleXon
25532549

25542550
def get_autoscaley_on(self):
2555-
"""
2556-
Get whether autoscaling for the y-axis is applied on plot commands
2557-
"""
2551+
"""Return whether the y-axis is autoscaled."""
25582552
return self._autoscaleYon
25592553

25602554
def set_autoscale_on(self, b):
25612555
"""
2562-
Set whether autoscaling is applied to axes on the next draw or call to
2563-
`.Axes.autoscale_view`.
2556+
Set whether autoscaling is applied to each axis on the next draw or
2557+
call to `.Axes.autoscale_view`.
25642558
25652559
Parameters
25662560
----------
@@ -2571,8 +2565,8 @@ def set_autoscale_on(self, b):
25712565

25722566
def set_autoscalex_on(self, b):
25732567
"""
2574-
Set whether autoscaling for the x-axis is applied to axes on the next
2575-
draw or call to `.Axes.autoscale_view`.
2568+
Set whether the x-axis is autoscaled on the next draw or call to
2569+
`.Axes.autoscale_view`.
25762570
25772571
Parameters
25782572
----------
@@ -2582,8 +2576,8 @@ def set_autoscalex_on(self, b):
25822576

25832577
def set_autoscaley_on(self, b):
25842578
"""
2585-
Set whether autoscaling for the y-axis is applied to axes on the next
2586-
draw or call to `.Axes.autoscale_view`.
2579+
Set whether the y-axis is autoscaled on the next draw or call to
2580+
`.Axes.autoscale_view`.
25872581
25882582
Parameters
25892583
----------

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -539,31 +539,22 @@ def update_datalim(self, xys, **kwargs):
539539
pass
540540

541541
def get_autoscale_on(self):
542-
"""
543-
Get whether autoscaling is applied for all axes on plot commands
544-
"""
542+
# docstring inherited
545543
return super().get_autoscale_on() and self.get_autoscalez_on()
546544

547545
def get_autoscalez_on(self):
548-
"""
549-
Get whether autoscaling for the z-axis is applied on plot commands
550-
"""
546+
"""Return whether the z-axis is autoscaled."""
551547
return self._autoscaleZon
552548

553549
def set_autoscale_on(self, b):
554-
"""
555-
Set whether autoscaling is applied on plot commands
556-
557-
Parameters
558-
----------
559-
b : bool
560-
"""
550+
# docstring inherited
561551
super().set_autoscale_on(b)
562552
self.set_autoscalez_on(b)
563553

564554
def set_autoscalez_on(self, b):
565555
"""
566-
Set whether autoscaling for the z-axis is applied on plot commands
556+
Set whether the z-axis is autoscaled on the next draw or call to
557+
`.Axes.autoscale_view`.
567558
568559
Parameters
569560
----------

0 commit comments

Comments
 (0)
0