Skip to content

Navigation Menu

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 0aa212a

Browse filesBrowse files
committed
adjustments based on code review
1 parent f496c13 commit 0aa212a
Copy full SHA for 0aa212a

File tree

2 files changed

+9
-1
lines changed
Filter options

2 files changed

+9
-1
lines changed

‎lib/matplotlib/colorbar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorbar.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,14 @@ def update_normal(self, mappable=None):
491491
and locator will be preserved.
492492
"""
493493
if mappable:
494+
# The mappable keyword argument exists because
495+
# ScalarMappable.changed() emits self.callbacks.process('changed', self)
496+
# in contrast, ColorizingArtist (and Colorizer) does not use this keyword.
497+
# [ColorizingArtist.changed() emits self.callbacks.process('changed')]
498+
# Also, there is no test where self.mappable == mappable is not True
499+
# and possibly no use case.
500+
# Therefore, the mappable keyword can be depreciated if cm.ScalarMappable
501+
# is removed.
494502
self.mappable = mappable
495503
_log.debug('colorbar update normal %r %r', self.mappable.norm, self.norm)
496504
self.set_alpha(self.mappable.get_alpha())

‎lib/matplotlib/colorizer.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorizer.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030

3131

32-
class Colorizer():
32+
class Colorizer:
3333
"""
3434
Class that holds the data to color pipeline
3535
accessible via `Colorizer.to_rgba(A)` and executed via

0 commit comments

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