ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 12 Dec 2013 03:45:49 +0100Sage plot inner structurehttps://ask.sagemath.org/question/8168/sage-plot-inner-structure/Hi, I would like to manipulate the raw data of a plot. More specifically, I'd like to get the set of points produced by implicit_plot in order to use it for another task.
Is that possible?jllbThu, 12 Dec 2013 03:45:49 +0100https://ask.sagemath.org/question/8168/get_minmax_data on implicit_plothttps://ask.sagemath.org/question/7920/get_minmax_data-on-implicit_plot/This is a sequel of [my question about plotting level set](http://ask.sagemath.org/question/358/plot-the-level-sets-of-a-function).
In the following, G is a circle :
sage: f(x,y)=x**2+y**2
sage: G=implicit_plot(f==1,(x,-2,2),(y,-3,3))
sage: G.get_minmax_data()
{'xmin': -2.0, 'ymin': -3.0, 'ymax': 3.0, 'xmax': 2.0}
The "correct" get_minmax_data sould be
{'xmin': -1.0, 'ymin': -1.0, 'ymax': 1.0, 'xmax': 1.0}
As far as I understood the code (and the thread "Retrieving xy data from implicit plots" on Sage-support), the following is the relevant part :
xy_data_arrays = numpy.asarray([[[func(x, y) for x in xsrange(*ranges[0],include_endpoint=True)]
for y in xsrange(*ranges[1], include_endpoint=True)]
for func in g],dtype=float)
in ../plot/contour_plot.py
My questions are :
1. can I retrieve that xy_data_array ?
2. If I analyse xy_data_array, I suppose that extracting the point with lowest x-component such that the value is positive will provide me the "correct" xmin of the plot. I'm wrong ?
Laurent ClaessensFri, 04 Feb 2011 13:21:09 +0100https://ask.sagemath.org/question/7920/