Introduction to Karnak

karnak splash image

Karnak.jl is a package for drawing graphs and networks. It's built on top of Luxor.jl.

Karnak also uses Graphs.jl for graph construction, and NetworkLayout.jl for graph layout algorithms.

Note

There's a good selection of Julia packages for visualizing graphs:

Quick start

using Karnak
using Graphs
using NetworkLayout
g = barabasi_albert(100, 1)
@drawsvg begin
    background("black")
    sethue("white")
    drawgraph(g, layout=stress, vertexlabels = 1:nv(g))
end
Example block output
Note

Karnak.jl contains just one function: drawgraph(), and re-exports Luxor.jl. So all graphics and drawing functions are from Luxor. See the documentation of Luxor.jl for details.