Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BUG] Fix alpha bug on 3D PathCollection plots.#25478

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ricmperes wants to merge5 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromricmperes:main
Open
Changes fromall commits
Commits
File filter

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
12 changes: 11 additions & 1 deletionlib/mpl_toolkits/mplot3d/art3d.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -800,7 +800,17 @@
)
if len(color_array) > 1:
color_array = color_array[self._z_markers_idx]
return mcolors.to_rgba_array(color_array, self._alpha)

if color_array.shape[1] == 3: # color_array is RGB instead of RGBA
return mcolors.to_rgba_array(color_array, self._alpha)

Check warning on line 805 in lib/mpl_toolkits/mplot3d/art3d.py

View check run for this annotation

Codecov/ codecov/patch

lib/mpl_toolkits/mplot3d/art3d.py#L805

Added line #L805 was not covered by tests

converted_alphas = (
color_array[:, 3] * self._alpha
if self._alpha is not None
else color_array[:, 3]
)

return mcolors.to_rgba_array(color_array, converted_alphas)

def get_facecolor(self):
return self._maybe_depth_shade_and_sort_colors(super().get_facecolor())
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp