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

Restore (and warn on) seaborn styles in style.library#24265

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anntzer merged 1 commit intomatplotlib:mainfromQuLogic:seaborn-library
Oct 25, 2022

Conversation

QuLogic
Copy link
Member

PR Summary

Fixes#24264

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@@ -184,6 +184,8 @@ def test_deprecated_seaborn_styles():
with pytest.warns(mpl._api.MatplotlibDeprecationWarning):
mpl.style.use("seaborn-bright")
assert mpl.rcParams == seaborn_bright
with pytest.warns(mpl._api.MatplotlibDeprecationWarning):
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain this? You just tested this three lines above - do we understand why that test passed?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

That'sstyle.use, this isstyle.library.

Copy link
Member

Choose a reason for hiding this comment

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

Ah...

OTOH, do we expect users to accessstyle.library? Should this be private, or is it useful to expose?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't know if we expect them to or not, but we already have the bug report from a user, so itis being used. It is also documented, at least a little, in the module docstring. In any case, this is only the bug fix for now.

available = []


def reload_library():
"""Reload the style library."""
global library
library = update_user_library(_base_library)
library.update(update_user_library(_base_library))
Copy link
Contributor

Choose a reason for hiding this comment

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

To match previous semantics, library should be cleared first?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good catch.

@jklymak
Copy link
Member

Leaving open if@anntzer wants another quick look. Otherwise,@QuLogic feel free to self-merge

@anntzeranntzer merged commit3811658 intomatplotlib:mainOct 25, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestOct 25, 2022
@QuLogicQuLogic deleted the seaborn-library branchOctober 25, 2022 19:05
QuLogic added a commit that referenced this pull requestOct 25, 2022
…265-on-v3.6.xBackport PR#24265 on branch v3.6.x (Restore (and warn on) seaborn styles in style.library)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@jklymakjklymakjklymak approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.2
Development

Successfully merging this pull request may close these issues.

[Bug]: Setting matplotlib.pyplot.style.library['seaborn-colorblind'] result in key error on matplotlib v3.6.1
4 participants
@QuLogic@jklymak@anntzer@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp