From fe1043ec37862348372c69080f59e9b7a63ba0de Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 7 Aug 2024 20:27:27 -0400 Subject: [PATCH 1/2] 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 --- galleries/examples/subplots_axes_and_figures/axhspan_demo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py index 788030fcc5f3..995552d2e826 100644 --- a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py @@ -17,7 +17,7 @@ s = 2.9 * np.convolve(np.random.randn(500), np.ones(30) / 30, mode='valid') ax1.plot(s) ax1.axhspan(-1, 1, alpha=0.1) -ax1.set_ylim(-1.5, 1.5) +ax1.set(ylim = (-1.5, 1.5), title = "axhspan") mu = 8 @@ -29,6 +29,7 @@ ax2.axvspan(mu+sigma, mu+2*sigma, color='0.95') ax2.axvline(mu, color='darkgrey', linestyle='--') ax2.plot(x, y) +ax2.set(title = "axvspan") plt.show() From d75d748e6c4e1a08fbdf8ff78f8fdb953d8907b6 Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 7 Aug 2024 23:15:51 -0400 Subject: [PATCH 2/2] fix linting on phone --- galleries/examples/subplots_axes_and_figures/axhspan_demo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py index 995552d2e826..5544618016d6 100644 --- a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py @@ -17,7 +17,7 @@ s = 2.9 * np.convolve(np.random.randn(500), np.ones(30) / 30, mode='valid') ax1.plot(s) ax1.axhspan(-1, 1, alpha=0.1) -ax1.set(ylim = (-1.5, 1.5), title = "axhspan") +ax1.set(ylim=(-1.5, 1.5), title="axhspan") mu = 8 @@ -29,7 +29,7 @@ ax2.axvspan(mu+sigma, mu+2*sigma, color='0.95') ax2.axvline(mu, color='darkgrey', linestyle='--') ax2.plot(x, y) -ax2.set(title = "axvspan") +ax2.set(title="axvspan") plt.show()