Rework style sheet reference example to cycle props#24299
Rework style sheet reference example to cycle props#24299tacaswell merged 1 commit intomatplotlib:mainfrom
Conversation
oscargus
left a comment
There was a problem hiding this comment.
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.
703e3ae to
9b4b0b1
Compare
| 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.
I think we need to remove the comment above now?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.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