三列图表

Three column graphviz

如何重现该图:

使用 graphviz 节点?

我测试了几种排名组合,都没有成功。这是一个工作示例,距离 objective:

还很远
    digraph cohort_flow_chart {
    

  node [fontname = Helvetica, fontsize = 12, shape = box, style = rounded, width = 4]
  a[label = '1,618,937 \n hospitalisations due to alcohol\n and substence use related disorders']
  d[label = '1,882,629 \n hospitalisations due to\n schizophrenia']
  f[label = '780,811\n hospitalisations due to\n mood disorders']

  c[label = '114 million \n Brazilian cohort']

  b[label = '2,250,454 \n hospitalisations due to\n diabetes mellitus']
  e[label = '19,646,098\n hospitalisations due to\n cardiovascular diseases']
  g[label = '278,540\n hospitalisations due to\n tuberculossis']
  
  {rank = same a, b}
  {rank = same c, d, e}
  {rank = same f, g}

}

您需要边或 rank=source & rank=sink 来让您的节点进入不同的等级。
这将添加簇以获得 dot 以分别处理每一列:

digraph cohort_flow_chart {

 node [fontname = Helvetica, fontsize = 12, shape = box, style = rounded, width = 4]
 edge[style=invis]
 
  a[label = "1,618,937 \n hospitalisations due to alcohol\n and substence use related disorders"]
  d[label = "1,882,629 \n hospitalisations due to\n schizophrenia"]
  f[label = "780,811\n hospitalisations due to\n mood disorders"]

  c[label = "\n\n\n\n\n114 million \n Brazilian cohort\n\n\n\n\n\n" width=1.3]

  b[label = "2,250,454 \n hospitalisations due to\n diabetes mellitus"]
  e[label = "19,646,098\n hospitalisations due to\n cardiovascular diseases"]
  g[label = "278,540\n hospitalisations due to\n tuberculossis"]

  node[ style=invis label=""]
  d1 d2
  subgraph cluster_col1 { peripheries=0  a -> d -> f}
  subgraph cluster_col2 { peripheries=0  d1 -> c -> d2 }
  subgraph cluster_col3 { peripheries=0  b -> e -> g}
}

给予: