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