Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f527efd

Browse filesBrowse files
committed
FIX: undeprecate MaxNLocator default_params
1 parent 095caa1 commit f527efd
Copy full SHA for f527efd

File tree

Expand file treeCollapse file tree

1 file changed

+7
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-17
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+7-17Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,12 +1883,12 @@ class MaxNLocator(Locator):
18831883
"""
18841884
Select no more than N intervals at nice locations.
18851885
"""
1886-
_default_params = dict(nbins=10,
1887-
steps=None,
1888-
integer=False,
1889-
symmetric=False,
1890-
prune=None,
1891-
min_n_ticks=2)
1886+
default_params = dict(nbins=10,
1887+
steps=None,
1888+
integer=False,
1889+
symmetric=False,
1890+
prune=None,
1891+
min_n_ticks=2)
18921892

18931893
def __init__(self, *args, **kwargs):
18941894
"""
@@ -1940,7 +1940,7 @@ def __init__(self, *args, **kwargs):
19401940
if len(args) > 1:
19411941
raise ValueError(
19421942
"Keywords are required for all arguments except 'nbins'")
1943-
self.set_params(**{**self._default_params, **kwargs})
1943+
self.set_params(**{**self.default_params, **kwargs})
19441944

19451945
@staticmethod
19461946
def _validate_steps(steps):
@@ -1957,16 +1957,6 @@ def _validate_steps(steps):
19571957
steps = np.hstack((steps, 10))
19581958
return steps
19591959

1960-
@cbook.deprecated("3.1")
1961-
@property
1962-
def default_params(self):
1963-
return self._default_params
1964-
1965-
@cbook.deprecated("3.1")
1966-
@default_params.setter
1967-
def default_params(self, params):
1968-
self._default_params = params
1969-
19701960
@staticmethod
19711961
def _staircase(steps):
19721962
# Make an extended staircase within which the needed

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.