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 e9f0839

Browse filesBrowse files
committed
BUG : fix #3805
Enusure that norm.v{min,max} are not `None` before expanding them to ensure that 0 < vmax-vmin.
1 parent 3a828dd commit e9f0839
Copy full SHA for e9f0839

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎lib/matplotlib/colorbar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorbar.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,14 @@ def _process_values(self, b=None):
653653
self._values = v
654654
return
655655
else:
656-
self.norm.vmin, self.norm.vmax = mtrans.nonsingular(self.norm.vmin,
657-
self.norm.vmax,
658-
expander=0.1)
659656
if not self.norm.scaled():
660657
self.norm.vmin = 0
661658
self.norm.vmax = 1
659+
660+
self.norm.vmin, self.norm.vmax = mtrans.nonsingular(self.norm.vmin,
661+
self.norm.vmax,
662+
expander=0.1)
663+
662664
b = self.norm.inverse(self._uniform_y(self.cmap.N + 1))
663665
if self._extend_lower():
664666
b[0] = b[0] - 1

0 commit comments

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