Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation error in edgelabel argument #148

Open
valcarcexyz opened this issue Jul 8, 2021 · 0 comments
Open

Documentation error in edgelabel argument #148

valcarcexyz opened this issue Jul 8, 2021 · 0 comments

Comments

@valcarcexyz
Copy link

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant