# Wire plots

**URL:** <https://discourse.julialang.org/t/wire-plots/10100>\
**Category:** Visualization\
**Created:** [April 1, 2018, 3:31pm UTC](https://discourse.julialang.org/t/wire-plots/10100 "2018-04-01T15:31:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_Hinneck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anton_hinneck/32/22716_2.png) [@Anton\_Hinneck](https://discourse.julialang.org/u/Anton_Hinneck)\
**Post date:** [April 1, 2018, 3:31pm UTC](https://discourse.julialang.org/t/wire-plots/10100/1 "2018-04-01T15:31:59Z")

</div>

Hi, I urgently needed a certain type of wire plot to visualize the weights of arcs between the nodes in a network. As I could not find any existing solution, I created an own package using [Cairo](https://github.com/JuliaGraphics/Cairo.jl): [Hargreaves.jl](https://github.com/notNA91/Hargreaves.jl).

Is anybody aware of existing solutions?

The plots created by [Hargreaves.jl](https://github.com/notNA91/Hargreaves.jl) look as follows:

 ![wireplot](https://global.discourse-cdn.com/julialang/original/3X/f/3/f3cc125305bc22b854ddbbcd1b7727747db52e69.jpeg)

---

<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:** [April 1, 2018, 8:51pm UTC](https://discourse.julialang.org/t/wire-plots/10100/2 "2018-04-01T20:51:48Z")

</div>

This might help as an alternative:

```julia
using LightGraphs, GraphPlot

g = CompleteGraph(10)
ewidths = [src(x) ^ 1.2 for x in edges(g)]
gplot(g, edgelinewidth=ewidths, layout=circular_layout)

```

yielding

 ![15](https://global.discourse-cdn.com/julialang/original/3X/b/0/b0d9f1561a1dbf0a0f28a8f4e1a5155d3ad80f9f.png)

---

<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:** [April 1, 2018, 9:50pm UTC](https://discourse.julialang.org/t/wire-plots/10100/3 "2018-04-01T21:50:14Z")

</div>

@Anton_Hinneck - I really like your Hargreaves package. Any way you could help adapt it for LightGraphs?

---

<div class="post-metadata">

**Author:** ![Anton\_Hinneck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anton_hinneck/32/22716_2.png) [@Anton\_Hinneck](https://discourse.julialang.org/u/Anton_Hinneck)\
**Post date:** [April 1, 2018, 10:19pm UTC](https://discourse.julialang.org/t/wire-plots/10100/4 "2018-04-01T22:19:23Z")

</div>

Yes, gladly. I defined a type arcs, which stores the network in an adjacency matrix, plus the edges’ weights, to then pass it to the plotting function. I could reduce the code to the plotting function, which then would expect an input of type SimpleGraph, as I see it (only considering unidirected graphs). Having found LightGraphs a few days earlier would have been a time saver 🙂

---

<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:** [April 1, 2018, 10:26pm UTC](https://discourse.julialang.org/t/wire-plots/10100/5 "2018-04-01T22:26:11Z")

</div>

Let’s take this discussion to your repo then - I’ve forked and will make a PR shortly with a few suggestions. Thanks 🙂

---

<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:** [April 1, 2018, 10:27pm UTC](https://discourse.julialang.org/t/wire-plots/10100/6 "2018-04-01T22:27:01Z")

</div>

Argh - also - feel free to join us in Slack - a bunch of us hang out in #graphs 🙂

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [April 2, 2018, 11:47am UTC](https://discourse.julialang.org/t/wire-plots/10100/7 "2018-04-02T11:47:28Z")

</div>

Wow, that Hargreaves plot is beautiful.
