graph g { node [ shape="point" ]; 1 -- 2 [ label="e1" ]; 2 -- 3 [ label="e2" ]; }