Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b634d9 + 961742c commit da58453Copy full SHA for da58453
1 file changed
lib/matplotlib/colorbar.py
@@ -1069,7 +1069,8 @@ class Colorbar(ColorbarBase):
1069
def __init__(self, ax, mappable, **kw):
1070
# Ensure the given mappable's norm has appropriate vmin and vmax set
1071
# even if mappable.draw has not yet been called.
1072
- mappable.autoscale_None()
+ if mappable.get_array() is not None:
1073
+ mappable.autoscale_None()
1074
1075
self.mappable = mappable
1076
kw['cmap'] = cmap = mappable.cmap
0 commit comments