Skip to content
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
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/api/next_api_changes/2019-02-19-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deprecations
````````````

The unused `Locator.autoscale()` method is deprecated (pass the axis limits to
`Locator.view_limits()` instead).
3 changes: 3 additions & 0 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,7 @@ def get_unit_generic(freq):
def _get_interval(self):
return self.rule._rrule._interval

@cbook.deprecated("3.2")
def autoscale(self):
"""
Set the view limits to include the data range.
Expand Down Expand Up @@ -1355,6 +1356,7 @@ def _get_unit(self):
else:
return RRuleLocator.get_unit_generic(self._freq)

@cbook.deprecated("3.2")
def autoscale(self):
'Try to choose the view limits intelligently.'
dmin, dmax = self.datalim_to_dt()
Expand Down Expand Up @@ -1531,6 +1533,7 @@ def tick_values(self, vmin, vmax):

ticks.append(dt)

@cbook.deprecated("3.2")
def autoscale(self):
"""
Set the view limits to include the data range.
Expand Down
2 changes: 2 additions & 0 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def __call__(self):
else:
return np.deg2rad(self.base())

@cbook.deprecated("3.2")
def autoscale(self):
return self.base.autoscale()

Expand Down Expand Up @@ -414,6 +415,7 @@ def __call__(self):
else:
return [tick for tick in self.base() if tick > rorigin]

@cbook.deprecated("3.2")
def autoscale(self):
return self.base.autoscale()

Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,7 @@ def view_limits(self, vmin, vmax):
"""
return mtransforms.nonsingular(vmin, vmax)

@cbook.deprecated("3.2")
def autoscale(self):
"""Autoscale the view limits."""
return self.view_limits(*self.axis.get_view_interval())
Expand Down