8000 REF: simplify cycling through colors by ivanovmg · Pull Request #37664 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

REF: simplify cycling through colors #37664

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

Merged
merged 3 commits into from
Nov 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
REF: eliminate start=0 arg in islice
  • Loading branch information
ivanovmg committed Nov 7, 2020
commit fcd4ee23c4f2f787716d29cf27b8c1f6be3175f1
2 changes: 1 addition & 1 deletion pandas/plotting/_matplotlib/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _cycle_colors(colors: List[Color], num_colors: int) -> Iterator[Color]:
than needed and nothing needs to be done here.
"""
max_colors = max(num_colors, len(colors))
yield from itertools.islice(itertools.cycle(colors), 0, max_colors)
yield from itertools.islice(itertools.cycle(colors), max_colors)


def _get_colors_from_colormap(
Expand Down
0