Skip to content

Conversation

dcherian
Copy link
Contributor

This seemed the cleanest way to fix this. If both colors and cmap are specified, raise an error. If colors is specified and cmap was None, I set the auto-inferred cmap to None.

@@ -221,6 +221,14 @@ def map_dataarray(self, func, x, y, **kwargs):
self : FacetGrid object

"""

cmapkw = kwargs['cmap'] if 'cmap' in kwargs else None
colorskw = kwargs['colors'] if 'colors' in kwargs else None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use get here, e.g., kwargs.get('cmap').

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, that's a great feature.

@dcherian dcherian force-pushed the fix/colors-over-cmap branch from 99b9cac to 08bdb20 Compare February 27, 2018 19:12
@dcherian dcherian force-pushed the fix/colors-over-cmap branch from 08bdb20 to f02b90b Compare February 27, 2018 19:13
@dcherian
Copy link
Contributor Author

Rebased and squashed.

@shoyer shoyer merged commit 3419e9e into pydata:master Mar 6, 2018
@shoyer
Copy link
Member

shoyer commented Mar 6, 2018

Thanks!

@dcherian dcherian deleted the fix/colors-over-cmap branch May 10, 2018 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Faceting fails with levels (easy to fix)
3 participants