8000 More fixes · matplotlib/matplotlib@a973da8 · GitHub
[go: up one dir, main page]

Skip to content

Commit a973da8

Browse files
More fixes
1 parent 328c2f4 commit a973da8

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def __init__(self, *args, **kwargs):
261261
self.set_3d_properties(zs, zdir)
262262

263263
def set_3d_properties(self, verts, zs=0, zdir='z'):
264-
verts = np.vstack([verts, np.ones(len(verts)) * zs])
264+
verts = np.hstack([verts, np.ones((len(verts), 1)) * zs])
265265
self._segment3d = juggle_axes_vec(verts, zdir)
266266
self._facecolor3d = Patch.get_facecolor(self)
267267

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2340,7 +2340,7 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
23402340
if 'alpha' in kwargs:
23412341
p.set_alpha(kwargs['alpha'])
23422342

2343-
verts = np.vstack(verts, verts_zs)
2343+
verts = np.hstack([verts, np.asarray(verts_zs)[:, np.newaxis]])
23442344

23452345
xs, ys, verts_zs = art3d.juggle_axes_vec(verts, zdir)
23462346
self.auto_scale_xyz(xs, ys, verts_zs, had_data)

lib/mpl_toolkits/mplot3d/proj3d.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ def proj_transform_vec(vec, M):
162162
def proj_transform_vec_clip(vec, M):
163163
vecw = np.dot(M, vec)
164164
# Determine clipping before rescaling
165-
tis = np.logical_and(vecw[0] >= 0, vecw[0] <= 1,
166-
vecw[1] >= 0, vecw[1] <= 1)
165+
tis = (vecw[0] >= 0) * (vecw[0] <= 1) * (vecw[1] >= 0) * (vecw[1] <= 1)
167166
# clip here..
168167
# Can anybody comment on this piece of code? I don't understand it...
169168
if np.sometrue(tis):

0 commit comments

Comments
 (0)
0