A workaround finds the unique segments from the plot:
contour2d(x, y, uz, [0 0]); f = gca().children.children polyline_idx = find(f.type == 'Polyline'); curve1 = f(polyline_idx(1)).data; curve2 = f(polyline_idx(2)).data; curve3 = f(polyline_idx(3)).data; On Tue, 4 Jun 2024 at 08:44, Lester Anderson <arctica1...@gmail.com<mailto:arctica1...@gmail.com>> wrote: Hello, I have a simple contour2d plot that contours the zero level in a dataset, and that is fine. However, it is not easy to extract the data for the two curves as the figure properties suggest that the data are duplicated. Checking the graphic entities: f=gca().children.children f = [12x1 handle] Polyline Text Polyline Text Polyline Text Polyline Text Polyline Text Polyline Text Now, checking the data for each polyline entity (1 at the top and 6 bottom), f(1) and f(4) both give {298,2] and f(3) and f(6) as [305, 2]. The same effects are observed, I think, with the help demo for contour2d. Why is the data duplicated and the text also? Is there an easy way to pick each curve without testing the size of the data? This code works, but it concatenates all of the polyline data [xout,yout] = contour2di(x, y, uz, [0 0]); Trying to replicate the functionality of Matlab's contourc function and contour2d in Scilab is the closest. Thanks Lester This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/
_______________________________________________ users mailing list - users@lists.scilab.org Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org> https://lists.scilab.org/mailman/listinfo/users