FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

In scatter, fix single rgb edgecolors handling by efiring · Pull Request #19539 · matplotlib/matplotlib · GitHub

Repository navigation

In scatter, fix single rgb edgecolors handling - #19539

Merged
QuLogic merged 1 commit into
matplotlib:masterfrom
efiring:scatter_edgecolor_nan
Feb 19, 2021
Merged

QuLogic merged 1 commit into
matplotlib:masterfrom
efiring:scatter_edgecolor_nan

Conversation

efiring commented Feb 18, 2021 •
edited
Loading

Copy link
Copy Markdown
Member

Closes #19066.

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A ] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

tacaswell added this to the v3.4.0 milestone Feb 18, 2021
cbook._combine_masks(
x, y, s, c, colors, edgecolors, linewidths)
# Unmask edgecolors if it was actually a single RGB or RGBA.
if (x.size in (3, 4)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do we need a similar block for colors as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I believe that is already an (N,4) array out of _parse_scatter_color_args and should have broadcast correctly with the masks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, because the case that was problematic for colors was the case where edgecolors was being
set from colors, above all this. So handling edgecolors here takes care of it.

QuLogic merged commit 9a242b2 into matplotlib:master Feb 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plt.scatter, error with NaN values and edge color

3 participants


Back | FazBrowse Home | New Git URL