Skip to content

*_map should be aware of category_orders and "leave room" for missing categories #3048

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

Closed
nicolaskruchten opened this issue Jan 25, 2021 · 0 comments · Fixed by #3247
Closed
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

In the following examples, all markers of the same letter should have the same color, except in the last case, the a markers would have the specified color from color_discrete_map.

px.scatter(... color=["a", "c", "b", "d"], category_orders=dict(color=["a", "b", "c", "d"]))
px.scatter(... color=["a", "c", "a", "c"], category_orders=dict(color=["a", "b", "c", "d"]))
px.scatter(... color=["b", "d", "b", "d"], category_orders=dict(color=["a", "b", "c", "d"]))
px.scatter(... color=["a", "c", "b", "d"], category_orders=dict(color=["a", "b", "c", "d"]), 
    color_discrete_map=dict(a="red"))

This is technically a breaking change, so we'll release this in v5.

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 a pull request may close this issue.

1 participant