Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitb417a29

Browse files
committed
Use handle.get_array to get mappable information
Due to inconsistencies in the colormap setup, it is suggested to insteadcheck for `get_array` to get an array of values to be color mapped. Thischeck is more robust irrespective of whatever the type of colormap isset to be.
1 parent8998cbc commitb417a29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/matplotlib/legend.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def val_or_rc(val, rc_name):
563563
getter_names=color_getters[labelcolor]
564564
forhandle,textinzip(self.legendHandles,self.texts):
565565
try:
566-
ifisinstance(handle.cmap,colors.LinearSegmentedColormap):
566+
ifhandle.get_array()isnotNone:
567567
continue
568568
exceptAttributeError:
569569
pass

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp