-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check cmap type before comparing to categories #1462
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1462 +/- ##
==========================================
+ Coverage 88.94% 88.96% +0.01%
==========================================
Files 52 52
Lines 7781 7812 +31
==========================================
+ Hits 6921 6950 +29
- Misses 860 862 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think it fixes the issue.
One thing you could test is whether a categorical cmap as a string and LinearSegmentedColormap actually gets processed as expected.
Maybe I could do that in another PR since this one has solved the original issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
One thing you could test is whether a categorical cmap as a string and LinearSegmentedColormap actually gets processed as expected.
@Azaya89 has been working on cataloguing the different ways usage and values accepted by cmap/color_key/color/c/etc. Once we have a good reference document, we will be able to more easily identify gaps in the test suite and fix them. Let's do this in another PR to get the fix of this one merged and released.
fixes #1461 where the use of matplotlib colormap objects as
cmap
argument results in "TypeError: argument of type 'LinearSegmentedColormap' is not iterable...."