i trying create timeline associates years historical events in dot, somehow don't along dot user's guide.
here first take:
digraph { ratio=0.70 ranksep=.75 { node [shape=plaintext, fontsize=16]; past -> 1933 -> 1943 -> 1988 -> 2001 -> 2015 -> future; node [shape=plaintext, fontsize=14]; -> b -> c -> d -> e -> f -> g; {rank=same past -> } {rank=same 1943 -> c } {rank=same future g } } } the timeline on left taken user's guide. line on right meant contain corresponding information on historic event, e.g. year 1943 info c.
the output looks this:

however, have line on right closer left timeline. , historic events on right should not connected arrow each other.
somehow connection between f , g messed up, too.
both ratio , ranksep influence distance between nodes. advise using 1 or other see difference is. removing both gives shorter distance.
to remove arrows between events on right, edge style can set "invis".
running posted dot (see resulting image) not show weird connection between f , g...
using following dot:
digraph { node [shape=plaintext, fontsize=16]; past -> 1933 -> 1943 -> 1988 -> 2001 -> 2015 -> future; { node [fontsize=14]; edge [style=invis]; -> b -> c -> d -> e -> f -> g; } {rank=same past -> } {rank=same 1943 -> c } {rank=same future g } } yields result:

Comments
Post a Comment