Documentation error in edgelabel argument
Opened this issue · 0 comments
valcarcexyz commented
In the documentation in gplot
function, the edgelabel
argument says it can be both a vector or nothing, however, it can only be a vector.
I found the Union{Vector, Nothing} in the following places:
- Documentation site, in the "Function prototype" section (at the end of the page)
- In the docstring of
gplot
Example:
julia> gplot(g, edgelabel = nothing)
ERROR: MethodError: no method matching iterate(::Nothing)
Closest candidates are:
iterate(::Union{LinRange, StepRangeLen}) at range.jl:664
iterate(::Union{LinRange, StepRangeLen}, ::Int64) at range.jl:664
iterate(::T) where T<:Union{Base.KeySet{var"#s79", var"#s78"} where {var"#s79", var"#s78"<:Dict}, Base.ValueIterator{var"#s77"} where var"#s77"<:Dict} at dict.jl:693
...
Stacktrace:
[1] isempty(itr::Nothing)
@ Base .\essentials.jl:767
[2] gplot(g::MetaDiGraph{Int64, Float64}, locs_x_in::Vector{Float64}, locs_y_in::Vector{Float64}; nodelabel::Nothing, nodelabelc::RGB{FixedPointNumbers.N0f8}, nodelabelsize::Float64, NODELABELSIZE::Float64, nodelabeldist::Float64, nodelabelangleoffset::Float64, edgelabel::Nothing, edgelabelc::RGB{FixedPointNumbers.N0f8}, edgelabelsize::Float64, EDGELABELSIZE::Float64, edgestrokec::RGB{FixedPointNumbers.N0f8}, edgelinewidth::Float64, EDGELINEWIDTH::Float64, edgelabeldistx::Float64, edgelabeldisty::Float64, nodesize::Float64, NODESIZE::Float64, nodefillc::RGB{FixedPointNumbers.N0f8}, nodestrokec::Nothing, nodestrokelw::Float64, arrowlengthfrac::Float64, arrowangleoffset::Float64, linetype::String, outangle::Float64)
@ GraphPlot C:\Users\89446\.julia\packages\GraphPlot\vrIy8\src\plot.jl:121
[3] gplot(g::MetaDiGraph{Int64, Float64}; layout::typeof(spring_layout), keyargs::Base.Iterators.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:edgelabel,), Tuple{Nothing}}})
@ GraphPlot C:\Users\89446\.julia\packages\GraphPlot\vrIy8\src\plot.jl:229
[4] top-level scope
@ REPL[17]:1
However with gplot(g, edgelabel = [])
works fine.