Document use of tuples in annotate! shorthand
Include a description of the use of vectors of plain tuples in the docstring for `annotate!`.
This commit is contained in:
parent
5d935d29c5
commit
0e25767cd3
@ -453,12 +453,14 @@ Add annotations to an existing plot.
|
|||||||
# Arguments
|
# Arguments
|
||||||
|
|
||||||
- `anns`: An `AbstractVector` of tuples of the form `(x,y,text)`. The `text` object
|
- `anns`: An `AbstractVector` of tuples of the form `(x,y,text)`. The `text` object
|
||||||
can be a `String` or `PlotText`.
|
can be a `String`, `PlotText` PlotText (created with `text(args...)`),
|
||||||
|
or a tuple of arguments to `text` (e.g., `("Label", 8, :red, :top)`).
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
```julia-repl
|
```julia-repl
|
||||||
julia> plot(1:10)
|
julia> plot(1:10)
|
||||||
julia> annotate!([(7,3,"(7,3)"),(3,7,text("hey", 14, :left, :top, :green))])
|
julia> annotate!([(7,3,"(7,3)"),(3,7,text("hey", 14, :left, :top, :green))])
|
||||||
|
julia> annotate!([(4, 4, ("More text", 8, 45.0, :bottom, :red))])
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
annotate!(anns...; kw...) = plot!(; annotation = anns, kw...)
|
annotate!(anns...; kw...) = plot!(; annotation = anns, kw...)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user