# \#lightgraphs

**URL:** https://discourse.julialang.org/tag/lightgraphs/129.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Launching the graphs community calls](https://discourse.julialang.org/t/launching-the-graphs-community-calls/103880)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 23\
**Last updated:** [February 7, 2025, 9:38pm UTC](https://discourse.julialang.org/t/launching-the-graphs-community-calls/103880 "2025-02-07T21:38:23Z")

</div>

In an effort to strengthen the graphs ecosystem, and following the lead of other organizations, we are launching the graphs community calls :tada: Our first goal is that contributors get to know each other and agree on …

---

## [The graphs ecosystem](https://discourse.julialang.org/t/the-graphs-ecosystem/99463)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 35\
**Last updated:** [August 6, 2024, 10:01am UTC](https://discourse.julialang.org/t/the-graphs-ecosystem/99463 "2024-08-06T10:01:22Z")

</div>

Hey everyone, The very fruitful discussion on fixing package fragmentation started from a remark I made on Slack about graphs, which is why I’m asking the community for ideas and support. In my opinion, the most import…

---

## [Load graphml with LightGraphs](https://discourse.julialang.org/t/load-graphml-with-lightgraphs/110590)

<div class="topic-metadata">

**Author:** [@Andromeda258](https://discourse.julialang.org/u/Andromeda258)\
**Replies:** 4\
**Last updated:** [February 25, 2024, 6:15am UTC](https://discourse.julialang.org/t/load-graphml-with-lightgraphs/110590 "2024-02-25T06:15:02Z")

</div>

I want to load a graphml graph as LightGraphs SimpleGraphs. This is the code I am using: \` using LightGraphs using GraphIO g = loadgraph(“graph.graphml”, GraphMLFormat()) ’ But I got this error: · ERROR: UndefVar…

---

## [\[RFC\] GraphInterface.jl: An interface proposal for Graphs.jl version 2.0](https://discourse.julialang.org/t/rfc-graphinterface-jl-an-interface-proposal-for-graphs-jl-version-2-0/104518)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 29\
**Last updated:** [October 8, 2023, 10:00pm UTC](https://discourse.julialang.org/t/rfc-graphinterface-jl-an-interface-proposal-for-graphs-jl-version-2-0/104518 "2023-10-08T22:00:07Z")

</div>

Hi, all! I’ve created a new package GraphInterface.jl as a proposal for the new AbstractGraph interface for Graphs.jl version 2.0. I know that there is ongoing work in the GraphsBase.jl repository on the new version 2.0 …

---

## [Graph.jl : How to interpret the output information returned by the shortest path algorithms?](https://discourse.julialang.org/t/graph-jl-how-to-interpret-the-output-information-returned-by-the-shortest-path-algorithms/94752)

<div class="topic-metadata">

**Author:** [@F\_A](https://discourse.julialang.org/u/F_A)\
**Replies:** 10\
**Last updated:** [February 17, 2023, 11:13am UTC](https://discourse.julialang.org/t/graph-jl-how-to-interpret-the-output-information-returned-by-the-shortest-path-algorithms/94752 "2023-02-17T11:13:23Z")

</div>

Hi there, I’d like to use Graph.jl package to run a shortest path algorithm. I have already read this page and am still not sure how to interpret the return traversal information of shortest path algorithm. Let’s assu…

---

## [Creating a Weighted Graph](https://discourse.julialang.org/t/creating-a-weighted-graph/41241)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 33\
**Last updated:** [June 16, 2020, 9:50pm UTC](https://discourse.julialang.org/t/creating-a-weighted-graph/41241 "2020-06-16T21:50:46Z")

</div>

I would like to try using a weighted graph. To this end, I added SimpleWeightedGraphs to Atom, created an erdos\_renyi directed graph, and then applied SimpleWeightedGraphs to this graph. const G = erdos\_renyi(10000, 0.0…

---

## [\[ANN\] GraphMakie.jl - Plotting graphs... with Makie!](https://discourse.julialang.org/t/ann-graphmakie-jl-plotting-graphs-with-makie/63734)

<div class="topic-metadata">

**Author:** [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Replies:** 9\
**Last updated:** [September 30, 2022, 3:47am UTC](https://discourse.julialang.org/t/ann-graphmakie-jl-plotting-graphs-with-makie/63734 "2022-09-30T03:47:13Z")

</div>

I’m happy to announce GraphMakie.jl, a graph¹ plotting package on top of Makie! Make sure to check out the docs! It currently it supports: 2D and 3D network plots edge and node labels a lot of the cool coloring stuff…

---

## [Edgelist representation as array](https://discourse.julialang.org/t/edgelist-representation-as-array/49960)

<div class="topic-metadata">

**Author:** [@SDA](https://discourse.julialang.org/u/SDA)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 11:39am UTC](https://discourse.julialang.org/t/edgelist-representation-as-array/49960 "2022-09-27T11:39:15Z")

</div>

I am wanting to get an edgelist from my graph that can then be used as a coordinate in 2D. using LightGraphs A = \[ 0 1 1 1 0 1 1 1 0 \] G = Graph(A) EL = collect(edges(G)) How can the edge list EL be converted to an ar…

---

## [Accessing edges in non-sorted fashion Graphs.jl?](https://discourse.julialang.org/t/accessing-edges-in-non-sorted-fashion-graphs-jl/70261)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 4\
**Last updated:** [August 25, 2022, 9:12am UTC](https://discourse.julialang.org/t/accessing-edges-in-non-sorted-fashion-graphs-jl/70261 "2022-08-25T09:12:40Z")

</div>

g = DiGraph(3); add\_edge!(g, 2, 1) add\_edge!(g, 1, 2) add\_edge!(g, 3, 2) julia\> collect(edges(g)) 3-element Vector{LightGraphs.SimpleGraphs.SimpleEdge{Int64}}: Edge 1 =\> 2 Edge 2 =\> 1 Edge 3 =\> 2 edges collected he…

---

## [\[ANN\] MultilayerGraphs.jl: A Package to Construct, Handle and Analyse Multilayer Graphs](https://discourse.julialang.org/t/ann-multilayergraphs-jl-a-package-to-construct-handle-and-analyse-multilayer-graphs/85988)

<div class="topic-metadata">

**Author:** [@InPhyT](https://discourse.julialang.org/u/InPhyT)\
**Replies:** 3\
**Last updated:** [August 24, 2022, 2:47pm UTC](https://discourse.julialang.org/t/ann-multilayergraphs-jl-a-package-to-construct-handle-and-analyse-multilayer-graphs/85988 "2022-08-24T14:47:43Z")

</div>

We are thrilled to announce MultilayerGraphs.jl: a Julia package for the construction, manipulation and analysis of multilayer graphs extending Graphs.jl. MultilayerGraphs.jl provides two custom types, MultilayerGraph a…

---

## [LightGraphs.jl Transition](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526)

<div class="topic-metadata">

**Author:** [@jpfairbanks](https://discourse.julialang.org/u/jpfairbanks)\
**Replies:** 73\
**Last updated:** [July 4, 2022, 12:20pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-transition/69526 "2022-07-04T12:20:39Z")

</div>

Since Jan 21, 2015 @sbromberger has been leading the LightGraphs development to build a correct, flexible, and performant graph analytics toolkit. I joined the project on March 3, 2015 when I needed to isolate the maxima…

---

## [How to extract weights from SimpleWeightedEdge (from kruskal\_mst)](https://discourse.julialang.org/t/how-to-extract-weights-from-simpleweightededge-from-kruskal-mst/81192)

<div class="topic-metadata">

**Author:** [@JedPhillips](https://discourse.julialang.org/u/JedPhillips)\
**Replies:** 5\
**Last updated:** [May 18, 2022, 7:19am UTC](https://discourse.julialang.org/t/how-to-extract-weights-from-simpleweightededge-from-kruskal-mst/81192 "2022-05-18T07:19:34Z")

</div>

I’m trying to figure out how to interact with a minimal spanning tree object returned by Graphs.kruskal\_mst(). I just can’t figure out how to extract the resulting edge wights (or the edges). Here’s a minimal code to sh…

---

## [Detect and Return Cycles in a given directed graph](https://discourse.julialang.org/t/detect-and-return-cycles-in-a-given-directed-graph/80493)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 20\
**Last updated:** [May 9, 2022, 9:20am UTC](https://discourse.julialang.org/t/detect-and-return-cycles-in-a-given-directed-graph/80493 "2022-05-09T09:20:17Z")

</div>

Hi there, I was wondering if there was a way to detect the number of cycles in a graph. And for each cycle detected, i want to know which nodes are involved in the cycle. I have attached an example of the simplest form…

---

## [Visualizing a dynamic changing graph](https://discourse.julialang.org/t/visualizing-a-dynamic-changing-graph/80255)

<div class="topic-metadata">

**Author:** [@flobe](https://discourse.julialang.org/u/flobe)\
**Replies:** 2\
**Last updated:** [April 29, 2022, 6:45pm UTC](https://discourse.julialang.org/t/visualizing-a-dynamic-changing-graph/80255 "2022-04-29T18:45:01Z")

</div>

Hi all, I am in the process of implementing a graph using MetaGraphs(Next).jl. The graph dynamically expands over time. Currently, I am using GraphRecipes to visualize the resulting graph at the end of my “time simulat…

---

## [Why do I keep getting a Method Error for Graphs package every time?](https://discourse.julialang.org/t/why-do-i-keep-getting-a-method-error-for-graphs-package-every-time/80004)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 6\
**Last updated:** [April 25, 2022, 8:28pm UTC](https://discourse.julialang.org/t/why-do-i-keep-getting-a-method-error-for-graphs-package-every-time/80004 "2022-04-25T20:28:23Z")

</div>

Hello there, I am having a seemingly recurring issue here. Lets say I am working on a Julia file with graphs for a while and everything is going well. Then I close that file and don’t use it for ages, and then the next…

---

## [Custom array (a variations on adjacency matrix for graphs)](https://discourse.julialang.org/t/custom-array-a-variations-on-adjacency-matrix-for-graphs/79196)

<div class="topic-metadata">

**Author:** [@AlexanderChen](https://discourse.julialang.org/u/AlexanderChen)\
**Replies:** 2\
**Last updated:** [April 8, 2022, 6:18am UTC](https://discourse.julialang.org/t/custom-array-a-variations-on-adjacency-matrix-for-graphs/79196 "2022-04-08T06:18:03Z")

</div>

Hi, So I am doing a project in which i need to heavily use a graph structure. I have tried several graph package in the past, but they are not flexible enough for my use case. So I started to wonder if the following is …

---

## [Indirect Connected vertices in a digraph](https://discourse.julialang.org/t/indirect-connected-vertices-in-a-digraph/77631)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 5\
**Last updated:** [March 9, 2022, 2:53pm UTC](https://discourse.julialang.org/t/indirect-connected-vertices-in-a-digraph/77631 "2022-03-09T14:53:58Z")

</div>

Hi guys, This may be an obvious or silly question but I cannot seem to figure out how to do so. I’m not sure how to do this especially for graphs with large number of vertices, where I want to check if there is a path …

---

## [Issues with Graphs.jl and GraphPlot](https://discourse.julialang.org/t/issues-with-graphs-jl-and-graphplot/76932)

<div class="topic-metadata">

**Author:** [@Temi-Tory](https://discourse.julialang.org/u/Temi-Tory)\
**Replies:** 1\
**Last updated:** [February 25, 2022, 5:57pm UTC](https://discourse.julialang.org/t/issues-with-graphs-jl-and-graphplot/76932 "2022-02-25T17:57:18Z")

</div>

Hello, I am not sure what is causing the following error message and I have been stuck for hours now :frowning: please help. For some reason, gplot is not working. My code: import Cairo,Fontconfig using Random, Gra…

---

## [Creating a graph with objects or structs as nodes](https://discourse.julialang.org/t/creating-a-graph-with-objects-or-structs-as-nodes/76088)

<div class="topic-metadata">

**Author:** [@flobe](https://discourse.julialang.org/u/flobe)\
**Replies:** 3\
**Last updated:** [February 10, 2022, 10:54am UTC](https://discourse.julialang.org/t/creating-a-graph-with-objects-or-structs-as-nodes/76088 "2022-02-10T10:54:36Z")

</div>

Hi everyone, I would like to create a graph where the nodes can contain multiple pieces of information. I tried to use graph.jl, but currently I don’t see any way to store more information than the child nodes. For exa…

---

## [LightGraphs.jl/Graphs.jl only values from half the cartesian plane is needed](https://discourse.julialang.org/t/lightgraphs-jl-graphs-jl-only-values-from-half-the-cartesian-plane-is-needed/74080)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 3\
**Last updated:** [January 5, 2022, 1:34pm UTC](https://discourse.julialang.org/t/lightgraphs-jl-graphs-jl-only-values-from-half-the-cartesian-plane-is-needed/74080 "2022-01-05T13:34:50Z")

</div>

Hi, this is a continuation of finding link distances between species in a food web. It’s been a few months so I am starting a new topic. I can find distances between species, but when I want to randomly choose a species …

---

## [Is there a lazy version of graph?](https://discourse.julialang.org/t/is-there-a-lazy-version-of-graph/73119)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 7\
**Last updated:** [December 16, 2021, 3:55pm UTC](https://discourse.julialang.org/t/is-there-a-lazy-version-of-graph/73119 "2021-12-16T15:55:06Z")

</div>

I came across an interesting problem recently that can be solved with the shortest path algorithms from Graphs.jl. The only problem is that it takes a “long time” (julia scale :slight\_smile: ) to build the graph because …

---

## [How to remove the vertex in Graphs or LightGraphs?](https://discourse.julialang.org/t/how-to-remove-the-vertex-in-graphs-or-lightgraphs/70789)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 3\
**Last updated:** [November 2, 2021, 10:13am UTC](https://discourse.julialang.org/t/how-to-remove-the-vertex-in-graphs-or-lightgraphs/70789 "2021-11-02T10:13:13Z")

</div>

julia\> myedges = \[ 1 =\> 2, 1 =\> 3, 2 =\> 1, 2 =\> 3, 3 =\> 1, 3 =\> 2, 3 =\> 4, 4 =\> 3, 4 =\> 8, 4 =\> 13, 5 =\> 6, 6 =\> 5, 7 =\> 8,…

---

## [LightGraphs docs not accessible?](https://discourse.julialang.org/t/lightgraphs-docs-not-accessible/69474)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 7\
**Last updated:** [October 26, 2021, 1:21am UTC](https://discourse.julialang.org/t/lightgraphs-docs-not-accessible/69474 "2021-10-26T01:21:25Z")

</div>

https://juliagraphs.org/LightGraphs.jl/latest/ the docs page give 404 error… Any idea whats the issue ?

---

## [How group nodes if a path exists between nodes?](https://discourse.julialang.org/t/how-group-nodes-if-a-path-exists-between-nodes/70127)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 1\
**Last updated:** [October 21, 2021, 8:15am UTC](https://discourse.julialang.org/t/how-group-nodes-if-a-path-exists-between-nodes/70127 "2021-10-21T08:15:55Z")

</div>

Hi, If I have some nodes coordinates and I have to group these nodes together if there is path exist between them. Is there any algorithm available? The graph structure looks like below: # Load the packages using Ligh…

---

## [Using LightGraphs to study ODEproblems](https://discourse.julialang.org/t/using-lightgraphs-to-study-odeproblems/69545)

<div class="topic-metadata">

**Author:** [@Frazze](https://discourse.julialang.org/u/Frazze)\
**Replies:** 3\
**Last updated:** [October 14, 2021, 10:41am UTC](https://discourse.julialang.org/t/using-lightgraphs-to-study-odeproblems/69545 "2021-10-14T10:41:33Z")

</div>

Hi everyone, I’m studying an ODEProblem where the function have a laplacian operator. #Domain and grid Nx = 40 Ny = 40 lx = 12 ly = 12 # the Laplacian operator function Laplacian2D(Nx, Ny, lx, ly) hx = lx/Nx hy = l…

---

## [GraphRecipes graphplot discrepancy nodeshape and nodecolor](https://discourse.julialang.org/t/graphrecipes-graphplot-discrepancy-nodeshape-and-nodecolor/69549)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 0\
**Last updated:** [October 11, 2021, 9:09am UTC](https://discourse.julialang.org/t/graphrecipes-graphplot-discrepancy-nodeshape-and-nodecolor/69549 "2021-10-11T09:09:07Z")

</div>

The following MWE gives incorrect colours for specified node shapes: using GraphRecipes using Plots M = \[0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 …

---

## [Traversing a directional graph](https://discourse.julialang.org/t/traversing-a-directional-graph/69470)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 0\
**Last updated:** [October 9, 2021, 10:50am UTC](https://discourse.julialang.org/t/traversing-a-directional-graph/69470 "2021-10-09T10:50:11Z")

</div>

How to traverse a directional graph in LightGraphs package in a unidirectional sense? Meaning I do want to omit the reverse edges if any in the DiGraph !

---

## [Interactive network visualization](https://discourse.julialang.org/t/interactive-network-visualization/49054)

<div class="topic-metadata">

**Author:** [@elkaps](https://discourse.julialang.org/u/elkaps)\
**Replies:** 22\
**Last updated:** [October 4, 2021, 11:56am UTC](https://discourse.julialang.org/t/interactive-network-visualization/49054 "2021-10-04T11:56:57Z")

</div>

I’m looking for a way to visualize networks while being able to add/remove/move vertices interactively. I’ve seen NetworkViz but it doesn’t look maintained anymore. Would it be possible to use GraphRecipes by getting t…

---

## [How to read a graph from a GML file](https://discourse.julialang.org/t/how-to-read-a-graph-from-a-gml-file/68539)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 1\
**Last updated:** [September 22, 2021, 6:03am UTC](https://discourse.julialang.org/t/how-to-read-a-graph-from-a-gml-file/68539 "2021-09-22T06:03:38Z")

</div>

I cannot figure out how to get a graph definition from a GML file. I downloaded the following file https://github.com/empet/Datasets/blob/master/gstrang\_descendants.gml and tried with the following code: using Ligh…

---

## [Plotting weighted graphs?](https://discourse.julialang.org/t/plotting-weighted-graphs/67277)

<div class="topic-metadata">

**Author:** [@Tqft](https://discourse.julialang.org/u/Tqft)\
**Replies:** 1\
**Last updated:** [August 29, 2021, 10:52am UTC](https://discourse.julialang.org/t/plotting-weighted-graphs/67277 "2021-08-29T10:52:45Z")

</div>

I’m dealing with weighted graphs (Dynkin diagrams for example) and need a simple way to plot them, preferably even on the terminal (in most examples the user would like to look at there are only a few vertices). Is there…

[Next page](https://discourse.julialang.org/tag/lightgraphs/129.md?match_all_tags=true&page=1&tags%5B%5D=lightgraphs)
