Skip to content

Commit fc6a048

Browse files
committed
Merge pull request #2494 from ugurthemaster/master
Update scatter_demo.py
2 parents d1cb803 + c35781e commit fc6a048

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/shapes_and_collections/scatter_demo.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
N = 50
99
x = np.random.rand(N)
1010
y = np.random.rand(N)
11+
colors = np.random.rand(N)
1112
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses
1213

13-
plt.scatter(x, y, s=area, alpha=0.5)
14+
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
1415
plt.show()

0 commit comments

Comments
 (0)