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

Skip to content

Commit fb18b4e

Browse files
authored
Merge pull request #9998 from timhoffm/fix-scatter-pychart
Fix scatter_piecharts example
2 parents 2132073 + 8ccf60c commit fb18b4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/api/scatter_piecharts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
x = [0] + np.cos(np.linspace(0, 2 * np.pi * r1, 10)).tolist()
2626
y = [0] + np.sin(np.linspace(0, 2 * np.pi * r1, 10)).tolist()
2727
xy1 = list(zip(x, y))
28-
s1 = np.max(xy1)
28+
s1 = np.abs(xy1).max()
2929

3030
x = [0] + np.cos(np.linspace(2 * np.pi * r1, 2 * np.pi * r2, 10)).tolist()
3131
y = [0] + np.sin(np.linspace(2 * np.pi * r1, 2 * np.pi * r2, 10)).tolist()
3232
xy2 = list(zip(x, y))
33-
s2 = np.max(xy2)
33+
s2 = np.abs(xy2).max()
3434

3535
x = [0] + np.cos(np.linspace(2 * np.pi * r2, 2 * np.pi, 10)).tolist()
3636
y = [0] + np.sin(np.linspace(2 * np.pi * r2, 2 * np.pi, 10)).tolist()
3737
xy3 = list(zip(x, y))
38-
s3 = np.max(xy3)
38+
s3 = np.abs(xy3).max()
3939

4040
fig, ax = plt.subplots()
4141
ax.scatter(range(3), range(3), marker=(xy1, 0),

0 commit comments

Comments
 (0)