FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Rework style sheet reference example to cycle props by deep-jkl · Pull Request #24299 · matplotlib/matplotlib · GitHub

Repository navigation

Rework style sheet reference example to cycle props - #24299

Merged
tacaswell merged 1 commit into
matplotlib:mainfrom
deep-jkl:cycle_styles_colored_circles
Nov 29, 2022
Merged

tacaswell merged 1 commit into
matplotlib:mainfrom
deep-jkl:cycle_styles_colored_circles

Conversation

deep-jkl commented Oct 29, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor

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 (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build 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 in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

oscargus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

deep-jkl commented Oct 29, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

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 and
actual output. Use inifinite props cycler.
deep-jkl force-pushed the cycle_styles_colored_circles branch from 703e3ae to 9b4b0b1 Compare October 29, 2022 11:54
QuLogic requested a review from jklymak November 1, 2022 08:43
oscargus added this to the v3.6-doc milestone Nov 8, 2022
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think we need to remove the comment above now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

jklymak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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...

tacaswell merged commit caec6ad into matplotlib:main Nov 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 29, 2022
ksunden added a commit that referenced this pull request Nov 29, 2022
…299-on-v3.6.x

Backport PR #24299 on branch v3.6.x (Rework style sheet reference example to cycle props)
ksunden added a commit that referenced this pull request Nov 29, 2022
…299-on-v3.6.2-doc

Backport PR #24299 on branch v3.6.2-doc (Rework style sheet reference example to cycle props)
ksunden mentioned this pull request Feb 20, 2023
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL