LinuxCommandLibrary

circo

Synthesize digital circuits into gate networks

TLDR

Render a PNG image with a filename based on the input filename and output format (uppercase -O)

$ circo -T [png] -O [path/to/input.gv]
copy

Render a SVG image with the specified output filename (lowercase -o)
$ circo -T [svg] -o [path/to/image.svg] [path/to/input.gv]
copy

Render the output in PS, PDF, SVG, Fig, PNG, GIF, JPEG, JSON, or DOT format
$ circo -T [format] -O [path/to/input.gv]
copy

Render a GIF image using stdin and stdout
$ echo "[digraph {this -> that} ]" | circo -T [gif] > [path/to/image.gif]
copy

Display help
$ circo -?
copy

SYNOPSIS

circo [-V|-?] [-Gattr=val] [-Nattr=val] [-Eattr=val] [-Tformat] [-ooutfile] [files]

PARAMETERS

-V
    Print version and exit.

-?
    Print usage information and exit.

-G attr=val
    Set graph attribute attr to val (repeatable).

-N attr=val
    Set default node attribute attr to val (repeatable).

-E attr=val
    Set default edge attribute attr to val (repeatable).

-T format
    Set output format (e.g., png, svg, pdf, ps).

-o outfile
    Write output to file outfile instead of stdout.

-O
    Automatically generate output filenames from input.

-l libfile
    Use external library file libfile.

-K layout
    Use layout engine layout (default: circo).

-n[f|v]
    No processing of files; use as input if f, or validate if v.

-q[n]
    Set quietness level to n (0-2).

-v[n]
    Set verbosity level to n (0-9).

-X
    Dump layout in canonical DOT format and exit.

DESCRIPTION

circo is a graph layout program from the Graphviz open-source toolkit, specializing in circular drawings of undirected graphs. It uses a force-directed placement algorithm derived from Kamada-Kawai and Davidson-Harel methods, optimized for circular layouts. This makes it ideal for visualizing graphs with cycles, rotational symmetry, or hub-and-spoke structures, such as communication networks, social graphs, or cyclic processes.

The command processes input files in DOT language, computes node positions in a circle while minimizing edge crossings and lengths, and renders output in various formats. Users can customize layouts via graph, node, and edge attributes passed on the command line. Circo excels with small to medium graphs (under 500 nodes) but may struggle with very dense or large datasets due to quadratic runtime complexity.

Unlike hierarchical tools like dot, circo treats all nodes radially, producing aesthetically pleasing circular diagrams without specified roots.

CAVEATS

Best for small undirected graphs (<500 nodes) with cycles; slow on large/dense graphs.
Experimental status; may produce suboptimal layouts for non-circular structures.

EXAMPLE USAGE

circo -Tpng input.dot -o output.png
Generates PNG circular layout from DOT file.

KEY ATTRIBUTES

Use circo -Gmargin=0.1 -Nshape=circle for compact circular nodes.
splines=false reduces edge curves.

INPUT FORMAT

Expects strict Graphviz DOT (undirected graphs preferred).

HISTORY

Introduced in Graphviz 1.16 (October 2004) by AT&T Research as an experimental circular layout engine, inspired by twopi but with improved force-directed placement.

SEE ALSO

dot(1), neato(1), fdp(1), sfdp(1), twopi(1), osage(1)

Copied to clipboard