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

Commit641d2fa

Browse files
authored
Merge pull request#18505 from QuLogic/empty-depthshading
Fix depth shading when edge/facecolor is none.
2 parentsa4128a7 +22627ca commit641d2fa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def _zalpha(colors, zs):
809809
# in all three dimensions. Otherwise, at certain orientations,
810810
# the min and max zs are very close together.
811811
# Should really normalize against the viewing depth.
812-
iflen(zs)==0:
812+
iflen(colors)==0orlen(zs)==0:
813813
returnnp.zeros((0,4))
814814
norm=Normalize(min(zs),max(zs))
815815
sats=1-norm(zs)*0.7

‎lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,14 @@ def test_scatter3d():
237237
deftest_scatter3d_color():
238238
fig=plt.figure()
239239
ax=fig.add_subplot(111,projection='3d')
240+
241+
# Check that 'none' color works; these two should overlay to produce the
242+
# same as setting just `color`.
243+
ax.scatter(np.arange(10),np.arange(10),np.arange(10),
244+
facecolor='r',edgecolor='none',marker='o')
240245
ax.scatter(np.arange(10),np.arange(10),np.arange(10),
241-
color='r',marker='o')
246+
facecolor='none',edgecolor='r',marker='o')
247+
242248
ax.scatter(np.arange(10,20),np.arange(10,20),np.arange(10,20),
243249
color='b',marker='s')
244250

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp