From 5d5239834c3d41a084f2ecc135e4a43840cd8e67 Mon Sep 17 00:00:00 2001 From: Tom Gillam Date: Wed, 26 Jan 2022 12:21:46 +0000 Subject: [PATCH] Example for vspan and hspan (#4062) * Example for vspan and hspan * Format * First time contributor --- .zenodo.json | 4 ++++ src/examples.jl | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 298ebb3d..8951c4ad 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -702,6 +702,10 @@ "affiliation": "Alogus Research Corporation", "name": "Lee Phillips", "type": "Other" + }, + { + "name": "Tom Gillam", + "type": "Other" } ], "upload_type": "software" diff --git a/src/examples.jl b/src/examples.jl index 1c148af8..1dcfae1b 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1264,6 +1264,19 @@ 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