Problem LightGraphs creating graphs and accessing vertices LightGraphs


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:

Would someone have a solution?

You might just need to do

using LightGraphs, GraphPlot

at the top of your script.

1 Like