Problem LightGraphs creating graphs and accessing vertices LightGraphs

Hi,

I struggle to have a reliable behavior using Lightgraphs. Yesterday, I could plot some graphs based on some arrays I had, but impossible to use the command “vertices(G)” for example (returned: UndefVarError: vertices not defined).

Today, when I launched my script, it even stops at “G=Graph()” with error UndefVarError: Graph not defined.

I checked my packages, they are well installed:
Pkg.add(“LightGraphs”)
Pkg.add(“GraphPlot”)

Would someone have a solution?

You might just need to do

using LightGraphs, GraphPlot

at the top of your script.

1 Like