-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Nan values in scatter 3d plot show in black colour when alpha parameter is passed. #25446
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
The default color for "bad" in the color maps is (0, 0, 0, 0) which if alpha gets set to 1 is black. My guess (without digging into the code) is that we are setting the alpha rather than multiplyin the alpha when it is set by the user.... |
Hello! Me and @eirinikafourou are students at the Department of Management Science and Technology in Athens University of Economics and Business and as a part of our class (Applied Software Engineering) we should contribute to an OS project. Could we handle this issue? |
We do not really assign issues, so please feel free to work on this (or any other issue). |
Seems like @tacaswell guess is correct: matplotlib/lib/mpl_toolkits/mplot3d/art3d.py Lines 764 to 772 in 63b9b04
The original alpha values are dropped at the first line and then a single alpha value is set at the last line. The solution would probably be to store the original alpha values and then concatenate them back (multiplied with |
Bug summary
In a
projection='3d'
axis, a scatter plot with thec
argument to colour the points is showing black markers in the position of nan values if thealpha
argument is passed. If thealpha
argument is not present, the nan values are not displayed, as expected. If thealpha
argument is present, even withalpha = 1
, the markers are coloured black.Code for reproduction
Actual outcome
Expected outcome
Additional information
No response
Operating system
Ubuntu
Matplotlib Version
3.7.0
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
Python 3.10.9
Jupyter version
6.5.2
Installation
conda
The text was updated successfully, but these errors were encountered: