diff --git a/examples/pie_and_polar_charts/polar_scatter_demo.py b/examples/pie_and_polar_charts/polar_scatter_demo.py index db8ece939887..71992f3c458c 100644 --- a/examples/pie_and_polar_charts/polar_scatter_demo.py +++ b/examples/pie_and_polar_charts/polar_scatter_demo.py @@ -1,8 +1,8 @@ """ Demo of scatter plot on a polar axis. -Size increases radially in this example and color increases with angle (just to -verify the symbols are being scattered correctly). +Size increases radially in this example and color increases with angle +(just to verify the symbols are being scattered correctly). """ import numpy as np import matplotlib.pyplot as plt @@ -11,11 +11,11 @@ N = 150 r = 2 * np.random.rand(N) theta = 2 * np.pi * np.random.rand(N) -area = 200 * r**2 * np.random.rand(N) +area = 200 * r**2 colors = theta ax = plt.subplot(111, projection='polar') -c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv) +c = ax.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv) c.set_alpha(0.75) plt.show()