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

Skip to content

Commit 1b348be

Browse files
committed
Remove bivariate_norm from mpl3d test code
1 parent 6bfca63 commit 1b348be

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
@@ -2952,13 +2952,12 @@ def get_test_data(delta=0.05):
29522952
'''
29532953
Return a tuple X, Y, Z with a test data set.
29542954
'''
2955-
2956-
from matplotlib.mlab import bivariate_normal
29572955
x = y = np.arange(-3.0, 3.0, delta)
29582956
X, Y = np.meshgrid(x, y)
29592957

2960-
Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
2961-
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
2958+
Z1 = np.exp(-(X**2 + Y**2) / 2) / (2 * np.pi)
2959+
Z2 = (np.exp(-(((X - 1) / 1.5)**2 + ((Y - 1) / 0.5)**2) / 2) /
2960+
(2 * np.pi * 0.5 * 1.5))
29622961
Z = Z2 - Z1
29632962

29642963
X = X * 10
@@ -2967,7 +2966,6 @@ def get_test_data(delta=0.05):
29672966
return X, Y, Z
29682967

29692968

2970-
29712969
########################################################
29722970
# Register Axes3D as a 'projection' object available
29732971
# for use just like any other axes

0 commit comments

Comments
 (0)