0

I employed the code below to create a flowchart. I had two questions that I'd appreciate advice on

  1. how do I add an horizontal node, e.g. to tab2,
  2. how do I increase font size within each node?

library(DiagrammeR)

grViz(diagram = "digraph flowchart {
  node [fontname = arial, shape = oval]
  tab1 [label = '@@1']
  tab2 [label = '@@2']
  tab3 [label = '@@3']
  tab4 [label = '@@4']
  tab5 [label = '@@5']
  tab6 [label = '@@6']
  tab7 [label = '@@7']
  

  
  tab1 -> tab2 -> tab3 -> tab4 -> tab5 -> tab6 -> tab7;
}
  
  [1]: 'Read'
  [2]: 'Identify '    
  [3]: 'Create ' 
  [4]: 'Clean '
  [5]: 'identify '
  [6]: 'review'
  [7]: 'Code '
   
  ")

Thanks.

bgreen
  • 63
  • 6

1 Answers1

0
  1. Give the nodes the same rank.

    tab8 [label= 'what else']

    {rank=same;tab2;tab8}

  2. Add attribute fontsize

    node [fontname = arial, shape = oval, fontsize='8']

Ben Welman
  • 301
  • 2
  • 4