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

Skip to content

Commit d534484

Browse files
committed
Fix radial increase of size & OO style
1 parent 9bfad84 commit d534484

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Demo of scatter plot on a polar axis.
33
4-
Size increases radially in this example and color increases with angle (just to
5-
verify the symbols are being scattered correctly).
4+
Size increases radially in this example and color increases with angle
5+
(just to verify the symbols are being scattered correctly).
66
"""
77
import numpy as np
88
import matplotlib.pyplot as plt
@@ -11,11 +11,11 @@
1111
N = 150
1212
r = 2 * np.random.rand(N)
1313
theta = 2 * np.pi * np.random.rand(N)
14-
area = 200 * r**2 * np.random.rand(N)
14+
area = 200 * r**2
1515
colors = theta
1616

1717
ax = plt.subplot(111, projection='polar')
18-
c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv)
18+
c = ax.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv)
1919
c.set_alpha(0.75)
2020

2121
plt.show()

0 commit comments

Comments
 (0)