-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: ValueError: The truth value...
when an ndarray is passed to the color
kwarg of axes3d.scatter
#26821
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
Comments
This behavior was changed in #26249 I think that the conditional should actually be: if "color" in kwargs: as it is using |
I think the condition actually should be
To make explicit color=None work and comply with
|
Good first issue - notes for new contributorsThis issue is suited to new contributors because it does not require understanding of the Matplotlib internals. To get started, please see our contributing guide. We do not assign issues. Check the Development section in the sidebar for linked pull requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please collaborate on the work by reviewing it rather than duplicating it in a competing PR. If something is unclear, please reach out on any of our communication channels. |
…trations (#7040) * Initial Create 3d_rotation_anime.py Check how it appears in the docs * remove text 3d_rotation_anime.py [skip active] * complete image_segmentation_spectral_graph_partiion.py.py * plot directly image_segmentation_spectral_graph_partiion.py.py * format + sample known plot image_segmentation_spectral_graph_partiion.py.py * errors fixed image_segmentation_spectral_graph_partiion.py.py * Rename image_segmentation_spectral_graph_partiion.py.py to plot_image_segmentation_spectral_graph_partiion.py.py * sklearn>=1.2 example.txt * sklearn>=1.3.1 example.txt * scikit-learn>=1.3.1 example.txt * error sc name plot_image_segmentation_spectral_graph_partiion.py.py * error + enumerate plot_image_segmentation_spectral_graph_partiion.py.py * last enumerate plot_image_segmentation_spectral_graph_partiion.py.py * matplotlib 3.8.0 example.txt * minor plot_image_segmentation_spectral_graph_partiion.py.py * color=tuple(X[i] / 255) plot_image_segmentation_spectral_graph_partiion.py.py matplotlib/matplotlib#26821 * error, style, comments plot_image_segmentation_spectral_graph_partiion.py.py * remove matplotlib example.txt * added Plot the RGB dataset as an image. * style/comment edits plot_image_segmentation_spectral_graph_partiion.py.py * lint " plot_image_segmentation_spectral_graph_partiion.py.py * thumbnail #3 plot_image_segmentation_spectral_graph_partiion.py.py * move to Algorithms plot_image_segmentation_spectral_graph_partiion.py * Delete examples/3d_drawing/plot_image_segmentation_spectral_graph_partiion.py.py * data animation added plot_image_segmentation_spectral_graph_partiion.py * anime fix + lint plot_image_segmentation_spectral_graph_partiion.py * add graph animation plot_image_segmentation_spectral_graph_partiion.py
…trations (networkx#7040) * Initial Create 3d_rotation_anime.py Check how it appears in the docs * remove text 3d_rotation_anime.py [skip active] * complete image_segmentation_spectral_graph_partiion.py.py * plot directly image_segmentation_spectral_graph_partiion.py.py * format + sample known plot image_segmentation_spectral_graph_partiion.py.py * errors fixed image_segmentation_spectral_graph_partiion.py.py * Rename image_segmentation_spectral_graph_partiion.py.py to plot_image_segmentation_spectral_graph_partiion.py.py * sklearn>=1.2 example.txt * sklearn>=1.3.1 example.txt * scikit-learn>=1.3.1 example.txt * error sc name plot_image_segmentation_spectral_graph_partiion.py.py * error + enumerate plot_image_segmentation_spectral_graph_partiion.py.py * last enumerate plot_image_segmentation_spectral_graph_partiion.py.py * matplotlib 3.8.0 example.txt * minor plot_image_segmentation_spectral_graph_partiion.py.py * color=tuple(X[i] / 255) plot_image_segmentation_spectral_graph_partiion.py.py matplotlib/matplotlib#26821 * error, style, comments plot_image_segmentation_spectral_graph_partiion.py.py * remove matplotlib example.txt * added Plot the RGB dataset as an image. * style/comment edits plot_image_segmentation_spectral_graph_partiion.py.py * lint " plot_image_segmentation_spectral_graph_partiion.py.py * thumbnail networkx#3 plot_image_segmentation_spectral_graph_partiion.py.py * move to Algorithms plot_image_segmentation_spectral_graph_partiion.py * Delete examples/3d_drawing/plot_image_segmentation_spectral_graph_partiion.py.py * data animation added plot_image_segmentation_spectral_graph_partiion.py * anime fix + lint plot_image_segmentation_spectral_graph_partiion.py * add graph animation plot_image_segmentation_spectral_graph_partiion.py
…trations (networkx#7040) * Initial Create 3d_rotation_anime.py Check how it appears in the docs * remove text 3d_rotation_anime.py [skip active] * complete image_segmentation_spectral_graph_partiion.py.py * plot directly image_segmentation_spectral_graph_partiion.py.py * format + sample known plot image_segmentation_spectral_graph_partiion.py.py * errors fixed image_segmentation_spectral_graph_partiion.py.py * Rename image_segmentation_spectral_graph_partiion.py.py to plot_image_segmentation_spectral_graph_partiion.py.py * sklearn>=1.2 example.txt * sklearn>=1.3.1 example.txt * scikit-learn>=1.3.1 example.txt * error sc name plot_image_segmentation_spectral_graph_partiion.py.py * error + enumerate plot_image_segmentation_spectral_graph_partiion.py.py * last enumerate plot_image_segmentation_spectral_graph_partiion.py.py * matplotlib 3.8.0 example.txt * minor plot_image_segmentation_spectral_graph_partiion.py.py * color=tuple(X[i] / 255) plot_image_segmentation_spectral_graph_partiion.py.py matplotlib/matplotlib#26821 * error, style, comments plot_image_segmentation_spectral_graph_partiion.py.py * remove matplotlib example.txt * added Plot the RGB dataset as an image. * style/comment edits plot_image_segmentation_spectral_graph_partiion.py.py * lint " plot_image_segmentation_spectral_graph_partiion.py.py * thumbnail networkx#3 plot_image_segmentation_spectral_graph_partiion.py.py * move to Algorithms plot_image_segmentation_spectral_graph_partiion.py * Delete examples/3d_drawing/plot_image_segmentation_spectral_graph_partiion.py.py * data animation added plot_image_segmentation_spectral_graph_partiion.py * anime fix + lint plot_image_segmentation_spectral_graph_partiion.py * add graph animation plot_image_segmentation_spectral_graph_partiion.py
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
Passing a numpy array to the
color
argument ofax.scatter
results in aValueError
whenax
is initialized withprojection='3d'
. This error began occurring in our CI after the release of matplotlib 3.8.0.Code for reproduction
Actual outcome
Traceback from our CI suite:
Expected outcome
No error.
Additional information
projection='3d'
, the code does not error out.[0, 0, 0, 1]
) rather than an ndarray, the code does not error out, and displays a black, opaque point:Operating system
Ubuntu 22.04
Matplotlib Version
3.8.0
Matplotlib Backend
module://backend_interagg
Python version
3.9.17, 3.10.12
Jupyter version
N/A
Installation
pip
The text was updated successfully, but these errors were encountered: