Wire plots

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: Hargreaves.jl.

Is anybody aware of existing solutions?

The plots created by Hargreaves.jl look as follows:

2 Likes

This might help as an alternative:

using LightGraphs, GraphPlot

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

yielding

2 Likes

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

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 :slight_smile:

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

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

1 Like

Wow, that Hargreaves plot is beautiful.

2 Likes