Skip to content

Commit

Permalink
Example for vspan and hspan (#4062)
Browse files Browse the repository at this point in the history
* Example for vspan and hspan

* Format

* First time contributor
  • Loading branch information
tpgillam authored Jan 26, 2022
1 parent 2ddedf9 commit 5d52398
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,10 @@
"affiliation": "Alogus Research Corporation",
"name": "Lee Phillips",
"type": "Other"
},
{
"name": "Tom Gillam",
"type": "Other"
}
],
"upload_type": "software"
Expand Down
13 changes: 13 additions & 0 deletions src/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d52398

Please sign in to comment.