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 00a10ef

Browse filesBrowse files
tacaswelljklymak
andauthored
Apply suggestions from code review
I am going to squash these. Co-authored-by: Jody Klymak <jklymak@gmail.com>
1 parent 866493b commit 00a10ef
Copy full SHA for 00a10ef

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎lib/matplotlib/colorbar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorbar.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ def _get_ticker_locator_formatter(self):
839839
# default locator:
840840
nv = len(self._values)
841841
base = 1 + int(nv / 10)
842+
# put ticks on integers between the boundaries of NoNorm...
842843
locator = ticker.IndexLocator(base=base, offset=.5)
843844

844845
if minorlocator is None:
@@ -1098,6 +1099,7 @@ def _process_values(self):
10981099
if isinstance(self.norm, colors.BoundaryNorm):
10991100
b = self.norm.boundaries
11001101
elif isinstance(self.norm, colors.NoNorm):
1102+
# NoNorm has N blocks, so N+1 boundaries, cantered on integers:
11011103
b = np.arange(self.cmap.N + 1) - .5
11021104
else:
11031105
# otherwise make the boundaries from the size of the cmap:

0 commit comments

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