API: add_edges and add_contours