Regression with SimpleWeightedDiGraph
Closed this issue · 2 comments
Lecrapouille commented
Following #120 but on Julia 1.8.x
using SparseArrays, Graphs, SimpleWeightedGraphs, GraphPlot
g = smallgraph(:karate)
gplot(g) # working !!!
A = [2.0 3; 4 7]
sA = sparse(A)
G1 = SimpleWeightedDiGraph(A)
gplot(G1) # Not working
G2 = SimpleWeightedDiGraph(sA)
gplot(G2) # Not working
I have this error:
MethodError: no method matching spring_layout(::SimpleWeightedDiGraph{Int64, Float64})
Closest candidates are:
spring_layout(::AbstractGraph) at ~/.julia/packages/GraphPlot/HXIna/src/layout.jl:104
spring_layout(::AbstractGraph, ::Integer, ::Any...) at ~/.julia/packages/GraphPlot/HXIna/src/layout.jl:177
spring_layout(::AbstractGraph, ::Any) at ~/.julia/packages/GraphPlot/HXIna/src/layout.jl:104
simonschoelly commented
Huh, this is weird, as, as SimpleWeightedDiGraph
is an AbstractGraph
. Is it possible that you are using either an older version of GraphPlot.jl
or SimpleWeightedGraphs.jl
that still use LightGraphs.jl
instead of Graphs.jl?
Can you enter ]status
in your Julia REPL and paste the output here?
Lecrapouille commented
Sorry, I removed my .julia folder and installed back all packages and now it seems working well