|
18 | 18 | # z/colour axis on a log scale so we see both hump and spike. linear |
19 | 19 | # scale only shows the spike. |
20 | 20 | Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) + \ |
21 | | - 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) |
| 21 | + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) |
22 | 22 |
|
23 | 23 | fig, ax = plt.subplots(2, 1) |
24 | 24 |
|
|
37 | 37 | sine wave in Y. We can remove the power law using a PowerNorm. |
38 | 38 | ''' |
39 | 39 | X, Y = np.mgrid[0:3:complex(0, N), 0:2:complex(0, N)] |
40 | | -Z1 = (1+np.sin(Y*10.))*X**(2.) |
| 40 | +Z1 = (1 + np.sin(Y * 10.)) * X**(2.) |
41 | 41 |
|
42 | 42 | fig, ax = plt.subplots(2, 1) |
43 | 43 |
|
|
60 | 60 |
|
61 | 61 | X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] |
62 | 62 | Z1 = (bivariate_normal(X, Y, 1., 1., 1.0, 1.0))**2 \ |
63 | | - - 0.4 * (bivariate_normal(X, Y, 1.0, 1.0, -1.0, 0.0))**2 |
| 63 | + - 0.4 * (bivariate_normal(X, Y, 1.0, 1.0, -1.0, 0.0))**2 |
64 | 64 | Z1 = Z1/0.03 |
65 | 65 |
|
66 | 66 | fig, ax = plt.subplots(2, 1) |
|
83 | 83 | ''' |
84 | 84 | X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] |
85 | 85 | Z1 = (bivariate_normal(X, Y, 1., 1., 1.0, 1.0))**2 \ |
86 | | - - 0.4 * (bivariate_normal(X, Y, 1.0, 1.0, -1.0, 0.0))**2 |
| 86 | + - 0.4 * (bivariate_normal(X, Y, 1.0, 1.0, -1.0, 0.0))**2 |
87 | 87 | Z1 = Z1/0.03 |
88 | 88 |
|
89 | 89 | # Example of making your own norm. Also see matplotlib.colors. |
|
0 commit comments