Skip to content

Commit e1f88ba

Browse files
authored
Merge pull request matplotlib#28677 from story645/story645-patch-1
Doc: add axes titles to axhspan/axvspan
2 parents 3d37d7a + d75d748 commit e1f88ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

galleries/examples/subplots_axes_and_figures/axhspan_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
s = 2.9 * np.convolve(np.random.randn(500), np.ones(30) / 30, mode='valid')
1818
ax1.plot(s)
1919
ax1.axhspan(-1, 1, alpha=0.1)
20-
ax1.set_ylim(-1.5, 1.5)
20+
ax1.set(ylim=(-1.5, 1.5), title="axhspan")
2121

2222

2323
mu = 8
@@ -29,6 +29,7 @@
2929
ax2.axvspan(mu+sigma, mu+2*sigma, color='0.95')
3030
ax2.axvline(mu, color='darkgrey', linestyle='--')
3131
ax2.plot(x, y)
32+
ax2.set(title="axvspan")
3233

3334
plt.show()
3435

0 commit comments

Comments
 (0)