From 76cd70c881e764f7f7be9acd5fc2095e7bba8947 Mon Sep 17 00:00:00 2001 From: Tom Gillam Date: Mon, 24 Jan 2022 11:47:52 +0000 Subject: [PATCH] Example for vspan and hspan --- src/examples.jl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/examples.jl b/src/examples.jl index 1c148af8..530d0536 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1264,6 +1264,21 @@ const _examples = PlotExample[ ), ], ), + PlotExample( # 57 + "Vertical and horizonal spans", + """ + `vspan` and `hspan` can be used to shade horizontal and vertical ranges. + """, + [ + :( + begin + hspan([1, 2, 3, 4]; label="hspan", legend=:topleft) + vspan!([2, 3]; alpha=0.5, label="vspan") + plot!([0, 2, 3, 5], [-1, 3, 2, 6]; c=:black, lw=2, label="line") + end + ) + ] + ), ] # Some constants for PlotDocs and PlotReferenceImages