Kolaru
June 25, 2021, 1:59pm
#1
Looking at the documentation I can not found what are the available line styles for plotting lines. I only found :dashed
in one example.
Having a list somewhere or, if it already exists and I missed it, a link to it in the documentation of lines
would be helpful.
1 Like
jules
June 25, 2021, 3:17pm
#2
It’s dash, dot, dashdot and dashdotdot I think. We should add examples on the lines page. And you can pass an array of relative segment and gap lengths as well.
1 Like
You can have a look at the convert functions:
convert_attribute(x::Nothing, ::key"linestyle") = x
"""
`AbstractVector{<:AbstractFloat}` for denoting sequences of fill/nofill. e.g.
[0.5, 0.8, 1.2] will result in 0.5 filled, 0.3 unfilled, 0.4 filled. 1.0 unit is one linewidth!
"""
convert_attribute(A::AbstractVector, ::key"linestyle") = A
"""
A `Symbol` equal to `:dash`, `:dot`, `:dashdot`, `:dashdotdot`
"""
convert_attribute(ls::Union{Symbol,AbstractString}, ::key"linestyle") = line_pattern(ls, :normal)
function convert_attribute(ls::Tuple{<:Union{Symbol,AbstractString},<:Any}, ::key"linestyle")
line_pattern(ls[1], ls[2])
end
function line_pattern(linestyle, gaps)
pattern = line_diff_pattern(linestyle, gaps)
This file has been truncated. show original