|
21 | 21 | x = [0] + np.cos(np.linspace(0, 2*math.pi*r1, 10)).tolist() |
22 | 22 | y = [0] + np.sin(np.linspace(0, 2*math.pi*r1, 10)).tolist() |
23 | 23 | xy1 = list(zip(x,y)) |
| 24 | +s1 = max(max(x),max(y)) |
24 | 25 |
|
25 | 26 | # ... |
26 | 27 | x = [0] + np.cos(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist() |
27 | 28 | y = [0] + np.sin(np.linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist() |
28 | 29 | xy2 = list(zip(x,y)) |
| 30 | +s2 = max(max(x),max(y)) |
29 | 31 |
|
30 | 32 | x = [0] + np.cos(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist() |
31 | 33 | y = [0] + np.sin(np.linspace(2*math.pi*r2, 2*math.pi, 10)).tolist() |
32 | 34 | xy3 = list(zip(x,y)) |
33 | | - |
| 35 | +s3 = max(max(x),max(y)) |
34 | 36 |
|
35 | 37 | fig, ax = plt.subplots() |
36 | | -ax.scatter( np.arange(3), np.arange(3), marker=(xy1,0), s=sizes, facecolor='blue' ) |
37 | | -ax.scatter( np.arange(3), np.arange(3), marker=(xy2,0), s=sizes, facecolor='green' ) |
38 | | -ax.scatter( np.arange(3), np.arange(3), marker=(xy3,0), s=sizes, facecolor='red' ) |
| 38 | +ax.scatter( np.arange(3), np.arange(3), marker=(xy1,0), |
| 39 | + s=[ s1*s1*x for x in sizes ], facecolor='blue' ) |
| 40 | +ax.scatter( np.arange(3), np.arange(3), marker=(xy2,0), |
| 41 | + s=[ s2*s2*x for x in sizes ], facecolor='green' ) |
| 42 | +ax.scatter( np.arange(3), np.arange(3), marker=(xy3,0), |
| 43 | + s=[ s3*s3*x for x in sizes ], facecolor='red' ) |
39 | 44 | plt.show() |
0 commit comments