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
Rework style sheet reference example to cycle props #24299
Rework style sheet reference example to cycle props #24299
Conversation
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.
703e3ae
to
9b4b0b1
Compare
| @@ -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)): | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 the range(nb_samples) always being exhausted now rather than sometimes cutting short based on the number of colors.
…299-on-v3.6.x Backport PR #24299 on branch v3.6.x (Rework style sheet reference example to cycle props)
…299-on-v3.6.2-doc Backport PR #24299 on branch v3.6.2-doc (Rework style sheet reference example to cycle props)
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
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst