Skip to content

Commit 55347c3

Browse files
committed
fix(comment): #28701 make the example intuitive @timhoffm #28702 (comment)
1 parent f2abc04 commit 55347c3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

doc/users/next_whats_new/fill_between_poly_collection.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ the ``set_data`` method, enabling e.g. resampling
1212
import numpy as np
1313
from matplotlib import pyplot as plt
1414
15-
t = np.linspace(0, 2, 9)
16-
f1 = t**2
17-
f2 = f1 + 0.2
18-
f3 = f2.copy()
19-
f3[6], f3[7], f3[8] = f3[8], f3[6], f3[7]
15+
t = np.linspace(0, 1)
2016
21-
fig, ax = plt.subplots(2)
22-
coll = ax.fill_between(t, f1, f3, step="pre")
17+
fig, ax = plt.subplots()
18+
coll = ax.fill_between(t, -t, t)
2319
fig.savefig("before.png")
2420
25-
coll.set_data(t, f1, f2, step="pre")
21+
coll.set_data(t, -t**4, t**4)
2622
fig.savefig("after.png")

0 commit comments

Comments
 (0)