I am trying to create a flowchart with 24 primary nodes and some other secondary nodes using GraphViz i.e. grViz().
I wish to increase the gap between the nodes to have a clear view. But it is reducing the font size of the labels in each node, though I have kept the fontsize = 200
for the label of each node. This is what I have done.
library( DiagrammeR )
DiagrammeR(diagram = "", type = "grViz")
#.....Using GraphViz.....
grViz("
digraph dot {
graph[layout = dot,
rankdir = LR]
#....adding node statement for 's_o' key....
node[shape = circle, width = 20, style = filled, color = Black, fontname = Arial, fontsize = 200, penwidth = 20]
node[fillcolor = red]
's_o'
#....adding node statement for primary branching....
#....defining the primary keys.....
node[shape = box, width = 30, style = filled, color = Black, fontname = Arial, fontsize = 200, penwidth = 20]
node[fillcolor = green]
's_j'; 'f_s'; 'b_v'; 'o_c'; 'm_h'; 'a_v', 'o_o', 'm_u_ \nw_s'; 'p_u_ \n24_h'; 'b_d_ \nm'; 'm_u_ \ne_p_ \ns_p'; 's_s_p'; 's_s_p'; 'c_im_ \ns_p'; 'u_s_p'; 'v_im_ \ns_p'; 'd_f_ \ns_p'; 'm_b_f_ \n_p'; 'p_s_p'; 's_w_f_ \n_p'; 'ir_r_t_ \n10'; 'a_t_ \n10'; 'o_h_ \n24'
#.....adding edge statement for primary statement....
#.....mapping the main node with the primary nodes....
edge[arrowhead = normal, arrowsize = 10,minlen = 6, style = bold, color = Black, headclip = TRUE, tailclip = TRUE]
s_o -> {'s_j'; 'f_s'; 'b_v'; 'o_c'; 'm_h'; 'a_v', 'o_o', 'm_u_ \nw_s'; 'p_u_ \n24_h'; 'b_d_ \nm'; 'm_u_ \ne_p_ \ns_p'; 's_s_p'; 'c_im_ \ns_p'; 'u_s_p'; 'v_im_ \ns_p'; 'd_f_ \ns_p'; 'm_b_f_ \n_p'; 'p_s_p'; 's_w_f_ \n_p'; 'ir_r_t_ \n10'; 'a_t_ \n10'; 'o_h_ \n24'}
#....adding node statement for secondary branching....
#.....Defining the secondary keys for 's_j' key...
node[shape = box, height = 5, width = 12, style = filled, color = Black, fontname = Arial, fontsize = 150, penwidth = 20]
node[fillcolor = orange]
'1 : \n j'; '2 : \n j'; '...' ;
#.....From 'f_s' key...
node[shape = box, height = 5, width = 30, style = filled, color = Black, fontname = Arial, fontsize = 150, penwidth = 20]
node[fillcolor = orange]
't1 : \n 0 or c_t_v'; 'l_k_s_t'; 'h_ts';
#.....From 'b_v' key...
node[shape = box, height = 5, width = 30, style = filled, color = Black, fontname = Arial, fontsize = 150, penwidth = 20]
node[fillcolor = orange]
't1 : \n 0 or c_t_v'; 'l_k_s_t'; 'h_ts';
'b_ts'
#.....adding edge statement for secondary statement....
#.....From 's_j' key....
edge[arrowhead = normal, arrowsize = 10,minlen = 6, style = bold, color = Black, headclip = TRUE, tailclip = TRUE]
s_j -> {'1 : \n j'; '2 : \n j'; '...'}
#.....From 'f_s' key....
edge[arrowhead = normal, arrowsize = 10,minlen = 6, style = bold, color = Black, headclip = TRUE, tailclip = TRUE]
f_s -> {'t1 : \n 0 or c_t_v'; 'l_k_s_t';
'h_ts'}
#.....From 'b_v' key....
edge[arrowhead = normal, arrowsize = 10,minlen = 6, style = bold, color = Black,
headclip = TRUE, tailclip = TRUE]
b_v -> {'t1 : \n 0 or c_t_v'; 'l_k_s_t';
'h_ts'; 'b_ts'}
#....adding a graph statement.....
graph[nodesep = 2]
}
")
Output :