Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Makes sense to me! I'll let someone else merge it, in case this is not the solution they are looking for.
deep-jkl commentedOct 29, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
703e3ae
to9b4b0b1
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 therange(nb_samples)
always being exhausted now rather than sometimes cutting short based on the number of colors.
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.
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...
…299-on-v3.6.xBackport PR#24299 on branch v3.6.x (Rework style sheet reference example to cycle props)
…299-on-v3.6.2-docBackport PR#24299 on branch v3.6.2-doc (Rework style sheet reference example to cycle props)
Uh oh!
There was an error while loading.Please reload this page.
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
pytest
passes).flake8-docstrings
and 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.rst
ornext_api_changes/README.rst