Documentation error in edgelabel argument
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- julia
- Domain
- documentation
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.
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.
- Dominant language
- Julia
- Stars
- 213
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
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.
More from JuliaGraphs/GraphPlot.jl
-
New fonts on 1.11 Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
JuliaGraphs/GraphPlot.jl#204 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
JuliaGraphs/GraphPlot.jl#199 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
JuliaGraphs/GraphPlot.jl#198 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaGraphs/GraphPlot.jl#197 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
JuliaGraphs/GraphPlot.jl#195 ·
All issues in JuliaGraphs/GraphPlot.jl
Similar issues
-
bug 🐞 distributed 🕸️
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CliMA/Oceananigans.jl#6049 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaGPU/GPUArrays.jl#780 ·