Skip to content

Commit cc301b7

Browse files
committed
MNT: revert changes to tick kwarg behavior
1 parent 562fe59 commit cc301b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/api/api_changes/2016-01-03_colorbar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ input.
99

1010
If ``mappable`` is a `contour.ContourSet` then a `TypeError` will be raised
1111
if the user provides any of
12-
``('alpha', 'boundaries', 'values', 'extend', 'ticks', 'filled')``
12+
``('alpha', 'boundaries', 'values', 'extend', 'filled')``

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,14 +887,14 @@ def __init__(self, ax, mappable, **kw):
887887
if isinstance(mappable, contour.ContourSet):
888888
CS = mappable
889889
override_list = ('alpha', 'boundaries', 'values', 'extend',
890-
'ticks', 'filled')
890+
'filled')
891891
kw = cbook.normalize_kwargs(kw, forbidden=override_list)
892892
kw['alpha'] = mappable.get_alpha()
893-
kw['ticks'] = ticker.FixedLocator(CS.levels, nbins=10)
894893
kw['boundaries'] = CS._levels
895894
kw['values'] = CS.cvalues
896895
kw['extend'] = CS.extend
897896
kw['filled'] = CS.filled
897+
kw.setdefault('ticks', ticker.FixedLocator(CS.levels, nbins=10))
898898
ColorbarBase.__init__(self, ax, **kw)
899899
if not CS.filled:
900900
self.add_lines(CS)

0 commit comments

Comments
 (0)