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

Skip to content

Commit 6b9bf3a

Browse files
committed
fixed proj3 clipping
svn path=/trunk/matplotlib/; revision=2517
1 parent 141e16b commit 6b9bf3a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

examples/simple3d_oo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import matplotlib
44
matplotlib.use('WXAgg')
5-
matplotlib.rcParams['numerix'] = 'numarray'
5+
matplotlib.rcParams['numerix'] = 'numpy'
66

77
from wxPython.wx import *
88
import matplotlib.axes3d

lib/matplotlib/proj3d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def proj_transform_vec_clip(vec, M):
182182
# clip here..
183183
txs,tys,tzs = vecw[0]/w,vecw[1]/w,vecw[2]/w
184184
tis = (vecw[0] > 0) * (vecw[0] < 1) * (vecw[1] > 0) * (vecw[1] < 1)
185+
if nx.sometrue( tis ):
186+
tis = vecw[1]
185187
return txs,tys,tzs,tis
186188

187189
def inv_transform(xs,ys,zs,M):

0 commit comments

Comments
 (0)