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

Rework style sheet reference example to cycle props#24299

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

Conversation

deep-jkl
Copy link
Contributor

@deep-jkldeep-jkl commentedOct 29, 2022
edited
Loading

PR Summary

There is different number of circles in the last figure of each style, when cycling is disabled.
This causes mismatch between docstring and the actual output.

This tries to support the problem reported in#24022.

PR Checklist

Tests and Styling

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

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • [N/A] API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • [N/A] Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

Copy link
Member

@oscargusoscargus left a comment

Choose a reason for hiding this comment

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

Makes sense to me! I'll let someone else merge it, in case this is not the solution they are looking for.

@deep-jkl
Copy link
ContributorAuthor

deep-jkl commentedOct 29, 2022
edited
Loading

Makes sense to me! I'll let someone else merge it, in case this is not the solution they are looking for.

Sure, let me just squash the commits and update the PR description and checklist.

There is a different number of circles in the last figure of each style,when cycling is disabled. This causes mismatch between docstring andactual output. Use inifinite props cycler.
@deep-jkldeep-jklforce-pushed thecycle_styles_colored_circles branch from703e3ae to9b4b0b1CompareOctober 29, 2022 11:54
@QuLogicQuLogic requested a review fromjklymakNovember 1, 2022 08:43
@oscargusoscargus added this to thev3.6-doc milestoneNov 8, 2022
@@ -63,7 +63,8 @@ def plot_colored_circles(ax, prng, nb_samples=15):
the color cycle, because different styles may have different numbers
of colors.
"""
for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'], range(nb_samples)):
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to remove the comment above now?

Copy link
Member

Choose a reason for hiding this comment

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

actually, on further reading I think the comment above is now more correct (with therange(nb_samples) always being exhausted now rather than sometimes cutting short based on the number of colors.

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

Fine with me. The comment above does need to be changed. I was also fine with the status quo and the comment, but it is strange to have different number of markers...

@tacaswelltacaswell merged commitcaec6ad intomatplotlib:mainNov 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestNov 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestNov 29, 2022
ksunden added a commit that referenced this pull requestNov 29, 2022
…299-on-v3.6.xBackport PR#24299 on branch v3.6.x (Rework style sheet reference example to cycle props)
ksunden added a commit that referenced this pull requestNov 29, 2022
…299-on-v3.6.2-docBackport PR#24299 on branch v3.6.2-doc (Rework style sheet reference example to cycle props)
@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

@tacaswelltacaswelltacaswell left review comments

@jklymakjklymakjklymak approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6-doc
Development

Successfully merging this pull request may close these issues.

4 participants
@deep-jkl@tacaswell@jklymak@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp