GraphPlot using logos as nodes

plotting

#1

xref: https://github.com/JuliaGraphs/GraphPlot.jl/issues/74

Dear all,
I would like to generate such a graph:

Has anyone else done something similar? Is there ready package for such a plotting?


#2

As you mention at the link above, Compose.jl has this capability (currently for svg output only). Here I’m just providing a working example:

using Compose
# read all files in directory
logos = read.("./logos/".*readdir("./logos"))

X = [(0.5, 0.2), (0.2, 0.8), (0.8, 0.8)]
point_array = [[x,y] for (x,y) in zip(X, X[[2,3,1]])]
Z = vcat([[x y] for (x,y) in X]...).-0.075

img = compose(context(),
    (context(), line(point_array), stroke(["red","blue","green"]), linewidth(1.5mm)),
    (context(order=2), bitmap(["image/png"], logos[[3,2,1]], Z[:,1], Z[:,2], [0.15], [0.15]))
)

draw(SVG(5inch,4inch), img)
# draw(SVG("bitmap_logos.svg", 5inch, 4inch), img)

bitmap_logos


#3

Here is a link to work in progress pull request: https://github.com/JuliaGraphs/GraphPlot.jl/pull/75. At the moment I haven’t figured out where these horizontal lines under the logos come from: