Colored circles example
Graphviz ยป Graphviz gallery

Prev:Cluster example
Next:Finite state machine example


This example was adapted from the "star" example in PyGraphviz (https://networkx.lanl.gov/pygraphviz/) and modified slightly.

USING: formatting kernel math sequences graphviz graphviz.notation graphviz.render ; : colored-circle ( i -- node ) [ <node> ] keep [ 16.0 / 0.5 + =width ] [ 16.0 / 0.5 + =height ] [ 16 * "#%2x0000" sprintf =fillcolor ] tri ; <graph> [graph "3,3" =size "circo" =layout ]; [node "filled" =style "circle" =shape "true" =fixedsize "" =label ]; [edge "invis" =style ]; 0 [add-node "invis" =style "none" =shape ]; 16 <iota> [ [ 0 -- ] [ colored-circle add ] bi ] each preview