Hey there, I'm struggling with a problem regarding plotting a shape directly from x,y coordinates.
I have a set of (x,y) coordinates of points that describes several contours in the (x, y) plane.
I can display those contours using :
The problem using this function is that the figure is quite heavy, and exporting it to pdf for, say, editing it on Inkscape results in a vector image with a weight of more than 10MB that Inkscape has troubles handling. Note that the coordinates contain more than 2000 (x,y) pairs.
The solution would be to plot those contours as a line rather with discrete points, but I don't find a way.
The two issues I get that make impossible to use plot rather than scatter is that :
- coordinates are in unordered manner so it gives me multiple lines going everywhere
- coordinates reprensent multiple contours at once so the different regions are connected with a line at some point.
I guess I could achieve something with the contour or surf functions, setting a fake z dimension that would describe the contours but I didn't manage...
Any insights? You'll find attached an example of two objects whose contours are described by their x,y coordinates.