graph g { node [ shape="circle" ]; { rank="same"; 1; 5; 7; } { rank="same"; 2; 3; 6; } 1 -- 2; 1 -- 3; 3 -- 4; 5 -- 6; }