Skip to content

Commit 8daf45d

Browse files
authored
Merge pull request #29038 from meeseeksmachine/auto-backport-of-pr-29036-on-v3.9.2-doc
Backport PR #29036 on branch v3.9.2-doc (Don't pass redundant inline=True to example clabel() calls.)
2 parents 981e635 + 9b1b45b commit 8daf45d

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy