JuliaGraphs / JuliaGraphs/GraphPlot.jl
Documentation error in edgelabel argument
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 213
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the gplot docstring in src/plot.jl and the Documentation site's Function prototype section linked in the issue. Check how edgelabel is described in both places, then update the documentation so it matches the demonstrated behavior; done means neither location claims that nothing is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100