Skip to content

Network visualization, tensor network, lattice et. al.

License

Notifications You must be signed in to change notification settings

GiggleLiu/Viznet.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Viznet

A visualization tool for atoms (based on Compose.jl).

Warning: still under development...

Build Status Codecov

To start

To install, type ] in a Julia REPL and then

pkg> add Viznet

As a first example, open a Julia REPL and type

using Viznet
using Compose

# define you atoms/lattice
sq = SquareLattice(5, 5)

# set the line brush and node brush
linebrush = bondstyle(:default, stroke("green"))
nodebrush = nodestyle(:default)

# draw something on the canvas
canvas() do
    for i in vertices(sq)
        nodebrush >> sq[i]
    end
    for (i, j) in bonds(sq)
        linebrush >> sq[i;j]
    end
end |> SVG("squarelattice.svg")

To learn more about customizing styles, please go to the documentation of Compose.jl.

Gallery

spinglass

chimera

Styles

Document eaten by a blackhole.