Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8037626

Browse filesBrowse files
committed
DOC: Update polar examples to use projection kwarg
1 parent 461da6c commit 8037626
Copy full SHA for 8037626

File tree

Expand file treeCollapse file tree

9 files changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+9
-9
lines changed

‎examples/api/logo2.py

Copy file name to clipboardExpand all lines: examples/api/logo2.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def add_matplotlib_text(ax):
5454

5555

5656
def add_polar_bar():
57-
ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], polar=True)
57+
ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], projection='polar')
5858

5959
ax.axesPatch.set_alpha(axalpha)
6060
ax.set_axisbelow(True)

‎examples/pie_and_polar_charts/polar_bar_demo.py

Copy file name to clipboardExpand all lines: examples/pie_and_polar_charts/polar_bar_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
radii = 10 * np.random.rand(N)
1111
width = np.pi / 4 * np.random.rand(N)
1212

13-
ax = plt.subplot(111, polar=True)
13+
ax = plt.subplot(111, projection='polar')
1414
bars = ax.bar(theta, radii, width=width, bottom=0.0)
1515

1616
# Use custom colors and opacity

‎examples/pie_and_polar_charts/polar_scatter_demo.py

Copy file name to clipboardExpand all lines: examples/pie_and_polar_charts/polar_scatter_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
area = 200 * r**2 * np.random.rand(N)
1515
colors = theta
1616

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

‎examples/pylab_examples/annotation_demo.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/annotation_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
# Text keyword args like horizontal and vertical alignment are
9595
# respected
9696
fig = plt.figure()
97-
ax = fig.add_subplot(111, polar=True)
97+
ax = fig.add_subplot(111, projection='polar')
9898
r = np.arange(0, 1, 0.001)
9999
theta = 2*2*np.pi*r
100100
line, = ax.plot(theta, r, color='#ee8d18', lw=3)

‎examples/pylab_examples/markevery_demo.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/markevery_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
for i, case in enumerate(cases):
9191
row = (i // cols)
9292
col = i % cols
93-
axpolar.append(fig4.add_subplot(gs[row, col], polar=True))
93+
axpolar.append(fig4.add_subplot(gs[row, col], projection='polar'))
9494
axpolar[-1].set_title('markevery=%s' % str(case))
9595
axpolar[-1].plot(theta, r, 'o', ls='-', ms=4, markevery=case)
9696
fig4.tight_layout()

‎examples/pylab_examples/polar_demo.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/polar_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
r = np.arange(0, 3.0, 0.01)
99
theta = 2 * np.pi * r
1010

11-
ax = plt.subplot(111, polar=True)
11+
ax = plt.subplot(111, projection='polar')
1212
ax.plot(theta, r, color='r', linewidth=3)
1313
ax.set_rmax(2.0)
1414
ax.grid(True)

‎examples/pylab_examples/polar_legend.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/polar_legend.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# force square figure and square axes looks better for polar, IMO
1212
fig = figure(figsize=(8, 8))
13-
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c')
13+
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], projection='polar', axisbg='#d5de9c')
1414

1515
r = np.arange(0, 3.0, 0.01)
1616
theta = 2*np.pi*r

‎examples/pylab_examples/subplots_demo.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/subplots_demo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
plt.setp([a.get_yticklabels() for a in axarr[:, 1]], visible=False)
6767

6868
# Four polar axes
69-
plt.subplots(2, 2, subplot_kw=dict(polar=True))
69+
plt.subplots(2, 2, subplot_kw=dict(projection='polar'))
7070

7171
plt.show()

‎examples/pylab_examples/transoffset.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/transoffset.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141

4242
# offset_copy works for polar plots also.
43-
ax = plt.subplot(2, 1, 2, polar=True)
43+
ax = plt.subplot(2, 1, 2, projection='polar')
4444

4545
trans_offset = mtrans.offset_copy(ax.transData, fig=fig, y=6, units='dots')
4646

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.