Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit98b051e

Browse files
oscargusmeeseeksmachine
authored andcommitted
Backport PRmatplotlib#23867: DOC: fix deprecation warnings in examples
1 parentf51659f commit98b051e

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

‎examples/mplot3d/box3d.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
zticks=[0,-150,-300,-450],
6868
)
6969

70-
# Setdistance and angle view
70+
# Setzoom and angle view
7171
ax.view_init(40,-30,0)
72-
ax.dist=11
72+
ax.set_box_aspect(None,zoom=0.9)
7373

7474
# Colorbar
7575
fig.colorbar(C,ax=ax,fraction=0.02,pad=0.1,label='Name [units]')

‎examples/shapes_and_collections/artist_reference.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def label(xy, text):
4545
label(grid[2],"Wedge")
4646

4747
# add a Polygon
48-
polygon=mpatches.RegularPolygon(grid[3],5,0.1)
48+
polygon=mpatches.RegularPolygon(grid[3],5,radius=0.1)
4949
patches.append(polygon)
5050
label(grid[3],"Polygon")
5151

‎examples/shapes_and_collections/patch_collection.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
]
4646

4747
foriinrange(N):
48-
polygon=Polygon(np.random.rand(N,2),True)
48+
polygon=Polygon(np.random.rand(N,2),closed=True)
4949
patches.append(polygon)
5050

5151
colors=100*np.random.rand(len(patches))

‎examples/specialty_plots/leftventricle_bulleye.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def bullseye_plot(ax, data, seg_bold=None, cmap=None, norm=None):
5656
theta=np.linspace(0,2*np.pi,768)
5757
r=np.linspace(0.2,1,4)
5858

59+
# Remove grid
60+
ax.grid(False)
61+
5962
# Create the bound for the segment 17
6063
foriinrange(r.shape[0]):
6164
ax.plot(theta,np.repeat(r[i],theta.shape),'-k',lw=linewidth)

‎examples/text_labels_and_annotations/figlegend_demo.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
l3,=axs[1].plot(x,y3,color='tab:green')
2424
l4,=axs[1].plot(x,y4,color='tab:red',marker='^')
2525

26-
fig.legend((l1,l2), ('Line 1','Line 2'),'upper left')
27-
fig.legend((l3,l4), ('Line 3','Line 4'),'upper right')
26+
fig.legend((l1,l2), ('Line 1','Line 2'),loc='upper left')
27+
fig.legend((l3,l4), ('Line 3','Line 4'),loc='upper right')
2828

2929
plt.tight_layout()
3030
plt.show()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp