graph g { node [ shape="point" ]; { rank="same"; 1 [ xlabel="1" ]; 2 [ xlabel="2" ]; } { rank="same"; 3 [ xlabel="3" ]; 4 [ xlabel="4" ]; } 1 -- 2; 1 -- 3; 1 -- 4; 3 -- 4; }