| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Previously this would result in the label color being ignored because
colors.to_rgba_array('none') results in a 0 length array which in turn has
a 0 length cycle, which results in the zip over texts and colors terminating
before we have touched any of the texts, ignoring the color.
This makes::
ax.legend(..., legendcolor='none')
ax.legend(..., legendcolor=['none'])
behave the same
| break | ||
| except AttributeError: | ||
| pass | ||
| elif isinstance(labelcolor, str) and labelcolor == 'none': |
There was a problem hiding this comment.
I guess I'd have thought these were redundant....
Sorry, something went wrong.
There was a problem hiding this comment.
If a numpy array come is than elif obj == "none": gets us the "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()" issue.
I thought about merging this with the conditional above, but was trying to avoid causing a rebase for @Carloscerq in #20084.
Sorry, something went wrong.
There was a problem hiding this comment.
Don’t worry about it. I think I can handle it over the weekend, and, if it’s the case, I can remake the #20084 .
Sorry, something went wrong.
…gendcolor='none')
…225-on-v3.4.x Backport PR #20225 on branch v3.4.x (FIX: correctly handle ax.legend(..., legendcolor='none'))
| Back | FazBrowse Home | New Git URL |
PR Summary
Previously this would result in the label color being ignored because
colors.to_rgba_array('none') results in a 0 length array which in turn has
a 0 length cycle, which results in the zip over texts and colors terminating
before we have touched any of the texts, ignoring the color.
This makes::
behave the same
Discovered this while reviewing #20084 and trying to demonstrate the difference between None and 'none' in our color conventions.
PR Checklist