Skip to content

Commit 016369d

Browse files
committed
Cleanup and move polar scatter demo
1 parent 653e532 commit 016369d

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
Demo of scatter plot on a polar axis.
3+
4+
Size increases radially in this example and color increases with angle (just to
5+
verify the symbols are being scattered correctly).
6+
"""
7+
import numpy as np
8+
import matplotlib.pyplot as plt
9+
10+
11+
N = 150
12+
r = 2 * np.random.rand(N)
13+
theta = 2 * np.pi * np.random.rand(N)
14+
area = 200 * r**2 * np.random.rand(N)
15+
colors = theta
16+
17+
ax = plt.subplot(111, polar=True)
18+
c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv)
19+
c.set_alpha(0.75)
20+
21+
plt.show()

examples/pylab_examples/polar_scatter.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/tests/backend_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
files['pie'] = [
7575
'pie_demo.py',
7676
'polar_bar_demo.py',
77+
'polar_scatter_demo.py',
7778
]
7879

7980
files['text_labels_and_annotations'] = [
@@ -210,7 +211,6 @@
210211
'plotfile_demo.py',
211212
'polar_demo.py',
212213
'polar_legend.py',
213-
'polar_scatter.py',
214214
'poormans_contour.py',
215215
'psd_demo.py',
216216
'psd_demo2.py',

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def subplot(*args, **kwargs):
804804
For additional information on :func:`axes` and
805805
:func:`subplot` keyword arguments.
806806
807-
:file:`examples/pylab_examples/polar_scatter.py`
807+
:file:`examples/pie_and_polar_charts/polar_scatter_demo.py`
808808
For an example
809809
810810
**Example:**

0 commit comments

Comments
 (0)