Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47dfbcc

Browse files
Fix Poly3Dcollection autoscaling
1 parent b9dfe72 commit 47dfbcc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2891,7 +2891,9 @@ def add_collection3d(self, col, zs=0, zdir='z', autolim=True, *,
28912891
self.auto_scale_xyz(*np.array(col._segments3d).transpose(),
28922892
had_data=had_data)
28932893
elif isinstance(col, art3d.Poly3DCollection):
2894-
self.auto_scale_xyz(*col._vec[:-1], had_data=had_data)
2894+
self.auto_scale_xyz(col._faces[..., 0],
2895+
col._faces[..., 1],
2896+
col._faces[..., 2], had_data=had_data)
28952897
elif isinstance(col, art3d.Patch3DCollection):
28962898
pass
28972899
# FIXME: Implement auto-scaling function for Patch3DCollection

0 commit comments

Comments
 (0)