How can I get the (x,y) values of the line that is plotted by a contour plot?
Look at the collections property of the returned ContourSet. In particular the get_paths() method of the first collection returns paired points making up each line segment.
cs.collections[0].get_paths()
To get a NumPy array of the coordinates, use the Path.vertices
attribute.
p1 = cs.collections[0].get_paths()[0] # grab the 1st path
coor_p1 = p1.vertices