Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1df6bf commit 398e174Copy full SHA for 398e174
1 file changed
lib/matplotlib/ticker.py
@@ -1058,7 +1058,7 @@ class MaxNLocator(Locator):
1058
integer=False,
1059
symmetric=False,
1060
prune=None)
1061
- def __init__(self, **kwargs):
+ def __init__(self, *args, **kwargs):
1062
"""
1063
Keyword args:
1064
@@ -1090,6 +1090,11 @@ def __init__(self, **kwargs):
1090
# I left "trim" out; it defaults to True, and it is not
1091
# clear that there is any use case for False, so we may
1092
# want to remove that kwarg. EF 2010/04/18
1093
+ if args:
1094
+ kwargs['nbins'] = args[0]
1095
+ if len(args) > 1:
1096
+ raise ValueError(
1097
+ "Keywords are required for all arguments except 'nbins'")
1098
self.set_params(**self.default_params)
1099
self.set_params(**kwargs)
1100
0 commit comments