Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe1043e

Browse files
authored
Doc: add axes titles to axhspan/axvspan
Because there are multiple axes here, titling the axes w. the function it's demoing helps highlight what's going on
1 parent 3d37d7a commit fe1043e

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)