8000 Modified scatter method to correctly recognize RGB/A values by vecuenca · Pull Request #6087 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Modified scatter method to correctly recognize RGB/A values #6087

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

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter
8000

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
Checking ndim instead of shape in the scatter method
  • Loading branch information
vecuenca committed Mar 11, 2016
commit 69ebbb92b2bd9488043ae436fd486626641e2d40
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3861,7 +3861,7 @@ def scatter(self, x, y, s=20, c=None, marker='o', cmap=None, norm=None,
# favor of mapping, not rgb or rgba.
try:
c_array = np.asanyarray(c, dtype=float)
if c_array.size == x.size and c_array.shape[0] != 1:
if c_array.size == x.size and c_array.ndim == 1:
c = np.ma.ravel(c_array)
else:
# Wrong size; it must not be intended for mapping.
Expand Down
0