3

I have a simple digraph that is supposed to represent a lattice - a graph where the nodes correspond to points in time and arcs represent words. Some 100 to 1000 nodes and about as many arcs.

Example structure:

Lattice

For each node, I have an exact time stamp, so I would like to force dot to put the nodes on an exact position on the x-axis

Here is my toy example:

digraph {
  rankdir="LR";
  0 -> 1 [label="cat"]
  0 -> 2 [label="can"]
  1 -> 3 [label="is"]
  2 -> 3 [label="has"]
}

You can see it in an online dot editor here.

How can I define the position on the x-axis of nodes 1 and 2 (e.g. to make 2 appear further to the right than 1)?

Anaksunaman
  • 16,718
  • 4
  • 38
  • 45
Pavel
  • 354
  • 5
  • 16
  • Non trivial. do you really want the X coordinate to be a function of the timestamp? What about (long) pauses when nothing is happening? This could make for a really wide graph. Neato will let you specify X coordinate, but you need to specify Y also. – sroush May 11 '20 at 04:26

0 Answers0