Skip to content
Prev Previous commit
Next Next commit
More fixes
  • Loading branch information
AlexandreAbraham committed Jun 8, 2016
commit a973da8086e5f1607646087535da49b081669d8b
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/mplot3d/art3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def __init__(self, *args, **kwargs):
self.set_3d_properties(zs, zdir)

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

Expand Down
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ def bar(self, left, height, zs=0, zdir='z', *args, **kwargs):
if 'alpha' in kwargs:
p.set_alpha(kwargs['alpha'])

verts = np.vstack(verts, verts_zs)
verts = np.hstack([verts, np.asarray(verts_zs)[:, np.newaxis]])

xs, ys, verts_zs = art3d.juggle_axes_vec(verts, zdir)
self.auto_scale_xyz(xs, ys, verts_zs, had_data)
Expand Down
3 changes: 1 addition & 2 deletions lib/mpl_toolkits/mplot3d/proj3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ def proj_transform_vec(vec, M):
def proj_transform_vec_clip(vec, M):
vecw = np.dot(M, vec)
# Determine clipping before rescaling
tis = np.logical_and(vecw[0] >= 0, vecw[0] <= 1,
vecw[1] >= 0, vecw[1] <= 1)
tis = (vecw[0] >= 0) * (vecw[0] <= 1) * (vecw[1] >= 0) * (vecw[1] <= 1)
# clip here..
# Can anybody comment on this piece of code? I don't understand it...
if np.sometrue(tis):
Expand Down