Skip to content

Commit a5f230a

Browse files
committed
DOC: colorbar.set_ticks() accepts a Locator.
Closes #4748.
1 parent ee030cb commit a5f230a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/matplotlib/colorbar.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,17 @@ def update_ticks(self):
387387

388388
def set_ticks(self, ticks, update_ticks=True):
389389
"""
390-
set tick locations. Tick locations are updated immediately unless
391-
update_ticks is *False*. To manually update the ticks, call
392-
*update_ticks* method explicitly.
390+
Set tick locations.
391+
392+
Parameters
393+
----------
394+
ticks : {None, sequence, :class:`~matplotlib.ticker.Locator` instance}
395+
If None, a default Locator will be used.
396+
397+
update_ticks : {True, False}, optional
398+
If True, tick locations are updated immediately. If False,
399+
use :meth:`update_ticks` to manually update the ticks.
400+
393401
"""
394402
if cbook.iterable(ticks):
395403
self.locator = ticker.FixedLocator(ticks, nbins=len(ticks))

0 commit comments

Comments
 (0)