I am trying, without success, to plot a graph based on an adjacency matrix and using the Graphs.jl
and GraphPlot.jl
packages.
What am I doing wrong?
graph = [
[0, 2, 4, 0, 0, 0],
[0, 0, 1, 7, 0, 0],
[0, 0, 0, 0, 3, 0],
[0, 0, 0, 0, 0, 1],
[0, 0, 0, 2, 0, 5],
[0, 0, 0, 0, 0, 0],
];
using Graphs
using GraphPlot
g = SimpleGraph(graph)
gplot(g)