the code below creates this diagram. I would like to to make all 3 subgraphs 5 nodes tall. so that, for example data_source_1, process_1 and product_1 are all horizontally aligned properly (same with process_5 and product_4). That would make the diagram better readable. is there a way of doing that? (I am using R to make the plot, but the issue is with the graphviz syntax).
library(DiagrammeR)
my_graph <- grViz(paste0("
digraph {
graph[splines = ortho,
ordering = 'in',
rankdir='LR',
concentrate=true,
labeljust= 'c',
layout = dot,
overlap =true,
outputorder = nodesfirst]
node [shape = rectangle, style = filled, fillcolor = 'blanchedalmond']
edge[color = black, arrowhead=vee, minlen = 1]
# draw lines
# from survey data to inpu
data_source_1 -> process_1
data_source_2 -> process_2
data_source_3 -> process_2
data_source_3 -> process_2
data_source_4 -> process_2
data_source_5 -> process_3
data_source_6 -> process_4
data_source_6 -> process_5
# from input to cleaning
process_1 -> product_1
process_2 -> product_2
process_3 -> product_3
process_4 -> product_3
process_5 -> product_4
# add clusters
subgraph cluster_1 {
node [style=filled]
'data_source_1' 'data_source_2' 'data_source_3' 'data_source_4' 'data_source_5' 'data_source_6'
color='red';
label = 'Data';
style=filled;
}
subgraph cluster_2 {
node [style=filled]
'process_1' 'process_2' 'process_3' 'process_4' 'process_5'
color='lightblue';
label = 'process';
style=filled;
}
subgraph cluster_3 {
node [style=filled]
'product_1' 'product_2' 'product_3' 'product_4'
color='yellow';
label = 'process';
style=filled;
}
}"))
my_graph