Hello all !
I'm sorry if my question is not clear, but I do not know ho to produce a
simple example.
I'm plotting the graph of an implicit given function (say x^2+y^2=3)
using Sage.
What I know it that
1. when I ask sage to plot implicit_plot( f==3,(x,-5,5),(y,-5,5) ),
Sage computes f-3 on an array of points in the square (-5,-5)x(5,5).
2. Sage creates an object matplotlib.figure.Figure that contains
somewhere the information about the array of computed points and ask
matplotlib to plot it
What I understood is that somewhere in matplotlib, the values are parsed
and a path is created. That path is the set of points on which f-3=0
My aim : catch the set of points that satisfy f-3=0. That has to be
stored --or at last computed-- somewhere in matplotlib.figure.Figure
I read the source, but I'm really lost.
The final purpose is to know the bounding box of the points that are
*actually* plotted without taking into account the axes, labels and
other decorations.
Does someone know how to do that ?
Since the object I have on hand is created by Sage[1] in a quite complex
way, I'm sorry to not being able to furnish an example.
Thanks
Laurent
If it can help, I have the following in a Sage terminal :
sage: var('x,y')
sage: F=implicit_plot(x**2+y**2==2,(x,-5,5),(y,-5,5),plot_points=100)
sage: F.matplotlib()
<matplotlib.figure.Figure object at 0xbfb60ac>
sage: F.matplotlib().get_children()
[<matplotlib.patches.Rectangle object at 0xc144e4c>,
<matplotlib.axes.AxesSubplot object at 0xc14472c>]
I really do not understand where is the data ??? In the Rectangle ? In
the Axes ?
On the Sage's side, the discussion is here :
http://ask.sagemath.org/question/359/get_minmax_data-on-implicit_plot
[1] www.sagemath.org
|