GraphRecipes.jl icon indicating copy to clipboard operation
GraphRecipes.jl copied to clipboard

edgelabel values are changed

Open teamclouday opened this issue 2 years ago • 0 comments

Hi, I'm using version v0.5.7 to plot a tree graph. And I find that if I set edgelabel, it will change the values inplace.
For example:

julia> g
5×5 Matrix{Int64}:
 0  1  0  0  1
 0  0  1  1  0
 0  0  0  0  0
 0  0  0  0  0
 0  0  0  0  0

julia> n
5-element Vector{String}:
 "A"
 "B"
 "-"
 "+"
 "-"

julia> e
Dict{Any, Any} with 1 entry:
  (1, 2) => "+"

After running graphplot, e's value is changed:

julia> graphplot(g, names=n, nodeshape=:circle, method=:tree, fontsize=15, edgelabel=e, curves=false)

julia> e
Dict{Any, Any} with 2 entries:
  (1, 2, 1) => "+"
  (1, 2)    => "+"

Is this expected?
I also experience the same issue as #155
Right now I have to use curves=false

teamclouday avatar Sep 03 '21 15:09 teamclouday