Skip to content
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

[ENH] Add colors argument to plot_series #3908

Merged
merged 1 commit into from Dec 19, 2022

Conversation

chillerobscuro
Copy link
Contributor

@chillerobscuro chillerobscuro commented Dec 8, 2022

Add an option to plot_series() to allow the user to pass a list of colors. I added a small util function to check that the length is correct, and use from matplotlib.colors import is_color_like to check that they are all valid colors. If either condition is not met, then it emits a warning and defaults back to the current behavior, which is using sns.color_palette("colorblind", n_colors=n_series).

Copy link
Contributor

@GuzalBulatova GuzalBulatova left a comment

Choose a reason for hiding this comment

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

Looks good to go! Please don't forget to add yourself to the list of contributors, if you haven't yet. Does the colors param works as expected?

@chillerobscuro chillerobscuro mentioned this pull request Dec 16, 2022
@chillerobscuro
Copy link
Contributor Author

Looks good to go! Please don't forget to add yourself to the list of contributors, if you haven't yet. Does the colors param works as expected?

Thanks Guzal, I'm already on the list and this feature works as expected, at least for me.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Great addition, thanks!

@fkiraly fkiraly changed the title [ENH] Add optional colors to plot_series() [ENH] Add colors argument to plot_series Dec 19, 2022
@fkiraly fkiraly merged commit 9e093f7 into sktime:main Dec 19, 2022
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.

None yet

3 participants