On Wed, Jun 2, 2010 at 12:22 AM, William Stein <[email protected]> wrote:
> Can you elaborate?   I read the above and thought.
>
> Claim: your proposal is worse.
> Proof: argument that my proposal is better.

We already do most of what you suggested.  In contour_plot.py, we have
the following:

g, ranges = setup_for_eval_on_grid([f], [xrange, yrange],
options['plot_points'])
...
xrange,yrange=[r[:2] for r in ranges]
...
xy_data_array = [[g(x, y) for x in xsrange(*ranges[0], include_endpoint=True)]
                              for y in xsrange(*ranges[1],
include_endpoint=True)]

So, all that is missing is storing the step sizes ( [r[2] for r in
ranges] ).  If we have those, then one can just generate the sample
points with the xsrange command as above.  (Since xsrange generates
evenly spaced points, you can just compute the step size based on the
dimensions of xy_data_array, but they may not always exactly line up
due to floating point issues.)

After the grid is computed, we hand it off to matplotlib which figures
out the curves to draw.  You had seemed to be suggesting doing this
part with our own code (connect the dots, etc.) which seems silly
compared to just using what matplotlib already provides.

--Mike

-- 
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

Reply via email to