On Tue, May 25, 2010 at 12:48 PM, jbeorse <[email protected]> wrote: > Hi, > > I am trying to retrieve the xy coordinates of an implicit plot, but I > am having trouble. I am able to do this with regular 2d plots without > a problem like this: > > p = plot(...) > for r in p: > X = numpy.array(r.xdata) > Y = numpy.array(r.ydata) > ... > > With an implicit plot I can retrieve the xy_data_array like this: > > ip = implicit_plot(...) > for r in ip: > XY = val.xy_data_array > > but I don't understand how to interpret that data. It is an nxn list > where n is the number of plot points and it seems to depend on x, y, > and the bounding box values. Is there any way I can interpret these > results? Is there any function that converts these to the simple xy > coordinates? > > To give context to my question, the purpose of me getting this data is > to perform a transformation on the curve, point by point. For any > implicit function that sage can plot I can to be able to perform my > transformation and view the original and the transformation side by > side. > > Thanks in advance for any help you can provide.
Hi, Nobody answered the above email, and I ended up talking in office hours today with the student who wrote it. I suggested that they just write their own implicit plot that (1) uses fast_float (or fast_callable) to make a quick version of the function, then (2) evaluates the function on a grid, and takes all points that are within epsilon of 0. (3) make a patch and submit it to sage later, which would *replace* implicit_plot by something like the above. Then at least the data can be manipulated. It seems to me that this should be at least as good as what we already have. The student suggested that one could even "connect the dots" using some sort of optimization technique. But maybe I'm totally wrong. I have a bad feeling I'm being naive. Thoughts? -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
