Skip to content

Commit d18c52b

Browse files
fix Line3D masking
1 parent 80a5a95 commit d18c52b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ def get_data_3d(self):
309309
@artist.allow_rasterization
310310
def draw(self, renderer):
311311
if self._axlim_clip:
312-
mask = _viewlim_mask(*self._verts3d, self.axes)
312+
mask = np.broadcast_to(
313+
_viewlim_mask(*self._verts3d, self.axes),
314+
(len(self._verts3d), *self._verts3d[0].shape)
315+
)
313316
xs3d, ys3d, zs3d = np.ma.array(self._verts3d,
314317
dtype=float, mask=mask).filled(np.nan)
315318
else:

0 commit comments

Comments
 (0)