Visualizing complex structures using Graphviz

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Drawing Paths

Sometimes a certain path is interesting in a graph, such as the shortest path between two points – as in planning a road trip. Usually edges get additional properties, like distances, road conditions, obstacles, or traffic jams. All of these factors contribute to evaluating a route.

Figure 7 shows a relatively simple example of such a path of a graph. The red color and changing width of the line are done using the color and penwidth attributes.

Figure 7: Path in a network.

To get a uniform hexagon, use the command circo when translating Listing 6 – all the other elements in the call remain the same.

Listing 6

Draw a Path

01 graph {
02 a -- b -- d -- c -- f[color=red,penwidth=3.0];
03 b -- c;
04 d -- e;
05 e -- f;
06 a -- d;
07 }

Dot Viewer

Apart from the rather antiquated dotty viewer program included in the Graphviz package, some research in the web will yield Smyrna [10] and ZGRViewer [11] among others.

The former has an "experimental" status, but it shows some promise based on the documentation. ZGRViewer is based on Java program code that so far has not been available for Debian or Ubuntu as a package.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Graphviz calculates flexible graphs

    Instead of toiling over a graphics layout, you can use Graphviz to concentrate on the essential content and let the software do the design.

  • Video compositing with Natron

    The Natron video program intends to compete with larger, commercial programs, such as AfterEffects and Nuke. At first, the controls may appear cumbersome and confusing, but with a little guidance and practice, everything becomes clear.

  • Video effects and compositing with Natron

    Elaborate video compositing, blue screen tricks, and other complex video effects normally only appear in high-priced programs like Adobe After Effects, Nuke, or Fusion. Natron is open source, free, and gives high-priced alternatives a run for their money.