8000 Cleanup autoscale-related docstrings. by anntzer · Pull Request #20339 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Cleanup autoscale-related docstrings. #20339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
8000
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2540,27 +2540,21 @@ def in_axes(self, mouseevent):
return self.patch.contains(mouseevent)[0]

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

def get_autoscalex_on(self):
"""
Get whether autoscaling for the x-axis is applied on plot commands
"""
"""Return whether the x-axis is autoscaled."""
return self._autoscaleXon

def get_autoscaley_on(self):
"""
Get whether autoscaling for the y-axis is applied on plot commands
"""
"""Return whether the y-axis is autoscaled."""
return self._autoscaleYon

def set_autoscale_on(self, b):
"""
Set whether autoscaling is applied to axes on the next draw or call to
`.Axes.autoscale_view`.
Set whether autoscaling is applied to each axis on the next draw or
call to `.Axes.autoscale_view`.

Parameters
----------
Expand All @@ -2571,8 +2565,8 @@ def set_autoscale_on(self, b):

def set_autoscalex_on(self, b):
"""
Set whether autoscaling for the x-axis is applied to axes on the next
draw or call to `.Axes.autoscale_view`.
Set whether the x-axis is autoscaled on the next draw or call to
`.Axes.autoscale_view`.

Parameters
----------
Expand All @@ -2582,8 +2576,8 @@ def set_autoscalex_on(self, b):

def set_autoscaley_on(self, b):
"""
Set whether autoscaling for the y-axis is applied to axes on the next
draw or call to `.Axes.autoscale_view`.
Set whether the y-axis is autoscaled on the next draw or call to
`.Axes.autoscale_view`.

Parameters
----------
Expand Down
19 changes: 5 additions & 14 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,31 +539,22 @@ def update_datalim(self, xys, **kwargs):
pass

def get_autoscale_on(self):
"""
Get whether autoscaling is applied for all axes on plot commands
"""
# docstring inherited
return super().get_autoscale_on() and self.get_autoscalez_on()

def get_autoscalez_on(self):
"""
Get whether autoscaling for the z-axis is applied on plot commands
"""
"""Return whether the z-axis is autoscaled."""
return self._autoscaleZon

def set_autoscale_on(self, b):
"""
Set whether autoscaling is applied on plot commands

Parameters
----------
b : bool
"""
# docstring inherited
super().set_autoscale_on(b)
self.set_autoscalez_on(b)

def set_autoscalez_on(self, b):
"""
Set whether autoscaling for the z-axis is applied on plot commands
Set whether the z-axis is autoscaled on the next draw or call to
`.Axes.autoscale_view`.

Parameters
----------
Expand Down
0