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

Skip to content

Commit 5f1648f

Browse files
committed
Remove bivariate_norm from mpl3d test code
1 parent d18baf6 commit 5f1648f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2939,13 +2939,12 @@ def get_test_data(delta=0.05):
29392939
'''
29402940
Return a tuple X, Y, Z with a test data set.
29412941
'''
2942-
2943-
from matplotlib.mlab import bivariate_normal
29442942
x = y = np.arange(-3.0, 3.0, delta)
29452943
X, Y = np.meshgrid(x, y)
29462944

2947-
Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
2948-
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
2945+
Z1 = np.exp(-(X**2 + Y**2) / 2) / (2 * np.pi)
2946+
Z2 = (np.exp(-(((X - 1) / 1.5)**2 + ((Y - 1) / 0.5)**2) / 2) /
2947+
(2 * np.pi * 0.5 * 1.5))
29492948
Z = Z2 - Z1
29502949

29512950
X = X * 10
@@ -2954,7 +2953,6 @@ def get_test_data(delta=0.05):
29542953
return X, Y, Z
29552954

29562955

2957-
29582956
########################################################
29592957
# Register Axes3D as a 'projection' object available
29602958
# for use just like any other axes

0 commit comments

Comments
 (0)