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

Commit 94c6ca7

Browse files
3d text masking
1 parent 9f66076 commit 94c6ca7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎lib/mpl_toolkits/mplot3d/art3d.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,13 @@ def set_3d_properties(self, z=0, zdir='z', axlim_clip=False):
179179
@artist.allow_rasterization
180180
def draw(self, renderer):
181181
if self._axlim_clip:
182-
xs, ys, zs = _viewlim_mask(self._x, self._y, self._z, self.axes)
183-
position3d = np.ma.row_stack((xs, ys, zs)).ravel().filled(np.nan)
182+
mask = _viewlim_mask(self._x, self._y, self._z, self.axes)
183+
pos3d = np.ma.array((self._x, self._y, self._z),
184+
dtype=float, mask=mask).filled(np.nan)
184185
else:
185-
xs, ys, zs = self._x, self._y, self._z
186-
position3d = np.asanyarray([xs, ys, zs])
186+
pos3d = np.asanyarray([self._x, self._y, self._z])
187187

188-
proj = proj3d._proj_trans_points(
189-
[position3d, position3d + self._dir_vec], self.axes.M)
188+
proj = proj3d._proj_trans_points([pos3d, pos3d + self._dir_vec], self.axes.M)
190189
dx = proj[0][1] - proj[0][0]
191190
dy = proj[1][1] - proj[1][0]
192191
angle = math.degrees(math.atan2(dy, dx))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /