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

Skip to content

Commit 810b3de

Browse files
committed
fixed proj3 clipping
svn path=/trunk/matplotlib/; revision=2520
1 parent 298c052 commit 810b3de

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/simple3d_oo.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from wxPython.wx import *
88
import matplotlib.axes3d
9+
import matplotlib.mlab
910
from matplotlib import numerix as nx
1011
from matplotlib.figure import Figure
1112
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg, FigureManager, NavigationToolbar2WxAgg
@@ -38,7 +39,7 @@ def plot3d(self):
3839
ax3d = matplotlib.axes3d.Axes3D(self.fig)
3940
plt = self.fig.axes.append(ax3d)
4041

41-
delta = nx.pi / 99.0
42+
delta = nx.pi / 199.0
4243
u = nx.arange(0, 2*nx.pi+(delta*2), delta*2)
4344
v = nx.arange(0, nx.pi+delta, delta)
4445

@@ -49,7 +50,7 @@ def plot3d(self):
4950

5051
#ax3d.plot_wireframe(x,y,z)
5152
surf = ax3d.plot_surface(x, y, z)
52-
surf.set_array(nx.arange(0, 1.0, 1/100.0))
53+
surf.set_array(matplotlib.mlab.linspace(0, 1.0, len(v)))
5354

5455
ax3d.set_xlabel('X')
5556
ax3d.set_ylabel('Y')

0 commit comments

Comments
 (0)