Skip to content

Commit

Permalink
Merge pull request matplotlib#10930 from krrk/scatter-examples
Browse files Browse the repository at this point in the history
DOC: Update definition of area in scatter examples
  • Loading branch information
tacaswell authored Mar 31, 2018
2 parents f916aad + ee1c066 commit 0b0a6a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/lines_bars_and_markers/scatter_masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
r0 = 0.6
x = 0.9 * np.random.rand(N)
y = 0.9 * np.random.rand(N)
area = np.pi * (10 * np.random.rand(N))**2 # 0 to 10 point radii
area = (20 * np.random.rand(N))**2 # 0 to 10 point radii
c = np.sqrt(area)
r = np.sqrt(x * x + y * y)
area1 = np.ma.masked_where(r < r0, area)
Expand Down
2 changes: 1 addition & 1 deletion examples/shapes_and_collections/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radii
area = (30 * np.random.rand(N))**2 # 0 to 15 point radii

plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()

0 comments on commit 0b0a6a0

Please sign in to comment.