R-DiagrammeR: How to display subgraphs in different rows?

Viewed 13

Two trees are in the same row (left to right). How can I display them in the different rows (up to down)? Thank you in advance. Current code displayed image link: https://i.stack.imgur.com/cpJcZ.jpg

digraph {
  graph [layout = dot, rankdir = TB]
  
  subgraph n_1{
  node [shape = rectangle]        
  rec1 [label = 'N=370']
  rec2 [label = 'Age<=20']
  rec3 [label =  'Age>20']

  
  rec1 -> rec2  rec1 -> rec3
  
  }
  
  subgraph n_2{
  
  node [shape = rectangle]        
  rec4 [label = 'N=102']
  rec5 [label = 'Education<=7']
  rec6 [label = 'Education>7']
  
  rec4 -> rec5  rec4 -> rec6
  }
[image link: https://i.stack.imgur.com/cpJcZ.jpg][1]
  }
0 Answers
Related