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

Commit651db62

Browse files
authored
Merge pull request#29036 from anntzer/ui
Don't pass redundant inline=True to example clabel() calls.
2 parents202a277 +126d2cc commit651db62

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

‎galleries/examples/images_contours_and_fields/contour_demo.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
fig,ax=plt.subplots()
3232
CS=ax.contour(X,Y,Z)
33-
ax.clabel(CS,inline=True,fontsize=10)
33+
ax.clabel(CS,fontsize=10)
3434
ax.set_title('Simplest default with labels')
3535

3636
# %%
@@ -42,15 +42,15 @@
4242
CS=ax.contour(X,Y,Z)
4343
manual_locations= [
4444
(-1,-1.4), (-0.62,-0.7), (-2,0.5), (1.7,1.2), (2.0,1.4), (2.4,1.7)]
45-
ax.clabel(CS,inline=True,fontsize=10,manual=manual_locations)
45+
ax.clabel(CS,fontsize=10,manual=manual_locations)
4646
ax.set_title('labels at selected locations')
4747

4848
# %%
4949
# You can force all the contours to be the same color.
5050

5151
fig,ax=plt.subplots()
5252
CS=ax.contour(X,Y,Z,6,colors='k')# Negative contours default to dashed.
53-
ax.clabel(CS,fontsize=9,inline=True)
53+
ax.clabel(CS,fontsize=9)
5454
ax.set_title('Single color - negative contours dashed')
5555

5656
# %%
@@ -59,7 +59,7 @@
5959
plt.rcParams['contour.negative_linestyle']='solid'
6060
fig,ax=plt.subplots()
6161
CS=ax.contour(X,Y,Z,6,colors='k')# Negative contours default to dashed.
62-
ax.clabel(CS,fontsize=9,inline=True)
62+
ax.clabel(CS,fontsize=9)
6363
ax.set_title('Single color - negative contours solid')
6464

6565
# %%
@@ -70,7 +70,7 @@
7070
linewidths=np.arange(.5,4,.5),
7171
colors=('r','green','blue', (1,1,0),'#afeeee','0.5'),
7272
)
73-
ax.clabel(CS,fontsize=9,inline=True)
73+
ax.clabel(CS,fontsize=9)
7474
ax.set_title('Crazy lines')
7575

7676
# %%
@@ -90,7 +90,7 @@
9090
CS.set_linewidth(lws)
9191

9292
ax.clabel(CS,levels[1::2],# label every second level
93-
inline=True,fmt='%1.1f',fontsize=14)
93+
fmt='%1.1f',fontsize=14)
9494

9595
# make a colorbar for the contour lines
9696
CB=fig.colorbar(CS,shrink=0.8)

‎galleries/examples/images_contours_and_fields/contour_label_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def fmt(x):
4343
fig,ax=plt.subplots()
4444
CS=ax.contour(X,Y,Z)
4545

46-
ax.clabel(CS,CS.levels,inline=True,fmt=fmt,fontsize=10)
46+
ax.clabel(CS,CS.levels,fmt=fmt,fontsize=10)
4747

4848
# %%
4949
# Label contours with arbitrary strings using a dictionary
@@ -59,7 +59,7 @@ def fmt(x):
5959
fmt[l]=s
6060

6161
# Label every other level using strings
62-
ax1.clabel(CS1,CS1.levels[::2],inline=True,fmt=fmt,fontsize=10)
62+
ax1.clabel(CS1,CS1.levels[::2],fmt=fmt,fontsize=10)
6363

6464
# %%
6565
# Use a Formatter

‎galleries/examples/misc/demo_agg_filter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ def filtered_text(ax):
188188

189189
# contour label
190190
cl=ax.clabel(CS,levels[1::2],# label every second level
191-
inline=True,
192191
fmt='%1.1f',
193192
fontsize=11)
194193

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp