Drawing nodes without edges, and aligning left and right side of rectangular node

I need to be able to draw nodes with fixed height, but variable width (based on time). I want the nodes to flow from left to right, with a variable amount of space between the left and right sides of adjacent nodes.

Textual example follows with "+---X---+" representing a node:

+---A---+ +---B---++----------C-----------+ +---D---+

What I'm attempting to do is to visualize where time is spent in an automated build process. The larger the horizontal node, the more time it takes. Spaces between nodes represents wait time.

I'm new to graphviz and need some help getting started.

Thanks in advance!

You could try something

You could try something like

graph {
  ranksep=0.00
  node [shape=box margin=0]
  edge [style=invis]
  rankdir=LR
  a[width=0.5]
  b[width=0.25]
  c[width=2.25]
  d[width=1.0]
  e[width=0.5]
  a -- b -- c -- d -- e
}

If you want to also encode wait time, stick space nodes between the process nodes. A wait node would have the form

A [width=0.75 label="" style=invis]

Process the file using dot.

Recent comments