# Coloring Graphs with Lightgraphs

**URL:** <https://discourse.julialang.org/t/coloring-graphs-with-lightgraphs/18521>\
**Category:** Graphs\
**Tags:** lightgraphs\
**Created:** [December 10, 2018, 2:11pm UTC](https://discourse.julialang.org/t/coloring-graphs-with-lightgraphs/18521 "2018-12-10T14:11:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexWue](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AlexWue](https://discourse.julialang.org/u/AlexWue)\
**Post date:** [December 10, 2018, 2:11pm UTC](https://discourse.julialang.org/t/coloring-graphs-with-lightgraphs/18521/1 "2018-12-10T14:11:10Z")

</div>

Hi all,

i am writing a paper in college about optimization problems in Julia.  
Regarding a network flow problem i would like to create a colored graph for visualization.  
I managed to visualize the nodes and edges with the corresponding values using the Lightgraphs package but I am stucked at coloring the nodes. There are different stages in the network (production, further processing, logistics, market) and I would like to color each node depending on the stage of this node. Is there any possibility for doing so with Lightgraphs?  
I found this topic([https://github.com/JuliaGraphs/LightGraphs.jl/issues/773](https://github.com/JuliaGraphs/LightGraphs.jl/issues/773) [https://github.com/JuliaGraphs/LightGraphs.jl/pull/844](https://github.com/JuliaGraphs/LightGraphs.jl/pull/844)) but no documentation on how to use this.

For any help I would be really grateful.

Best regards  
Alex

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [December 10, 2018, 3:22pm UTC](https://discourse.julialang.org/t/coloring-graphs-with-lightgraphs/18521/2 "2018-12-10T15:22:15Z")

</div>

If you’re using GraphPlot.jl, the option to color the nodes is `nodefillc` and `nodestrokec` (see [GitHub - JuliaGraphs/GraphPlot.jl: Graph visualization for Julia.](https://github.com/JuliaGraphs/GraphPlot.jl#arguments) for more details).

If you’re not using GraphPlot, what _are_ you using?

---

<div class="post-metadata">

**Author:** ![AlexWue](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@AlexWue](https://discourse.julialang.org/u/AlexWue)\
**Post date:** [December 13, 2018, 2:03pm UTC](https://discourse.julialang.org/t/coloring-graphs-with-lightgraphs/18521/3 "2018-12-13T14:03:19Z")

</div>

Yes, i am using GraphPlot.  
This is much easier than I thought, thank you very much!!

topic can be closed.
