# Revision history [back]

### generate_plot_points for multiple variable functions and contour_plot

Is there a default sage function to generate all (x,y,f(x,y)) values the program uses to draw a multivariable function or the contours of let's say a f(x,y)=C ? I am new to sage and could only find that generate_plot_points works only for one variable functions.

Example from documentation:

sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0)

I guess one could solve symbolically let's say a contour equation and then create the values i talk about like discussed here:

sage: var('x,y') (x, y) sage: solve(y^2 - x^3 - x == 0, [y]) [y == -sqrt(x)sqrt(x^2 + 1), y == sqrt(x)sqrt(x^2 + 1)]

then just plot each of those two above and combine them. But this could become really cumbersome since one could have a terribly complicated equation. So can this be done currently or someone needs a workaround to achieve this? excuse my english :)

 2 No.2 Revision kcrisman 12052 ●37 ●125 ●245

### generate_plot_points for multiple variable functions and contour_plot

Is there a default sage function to generate all (x,y,f(x,y)) values the program uses to draw a multivariable function or the contours of let's say a f(x,y)=C ? I am new to sage and could only find that generate_plot_points works only for one variable functions.

Example from documentation:

sage: from sage.plot.plot import generate_plot_points


I guess one could solve symbolically let's say a contour equation and then create the values i talk about like discussed here:

sage: var('x,y')
(x, y)
sage: solve(y^2 - x^3 - x == 0, [y])
[y == -sqrt(x)sqrt(x^2 -sqrt(x)*sqrt(x^2 + 1), y == sqrt(x)sqrt(x^2 sqrt(x)*sqrt(x^2 + 1)]1)]


then just plot each of those two above and combine them. But this could become really cumbersome since one could have a terribly complicated equation. So can this be done currently or someone needs a workaround to achieve this? excuse my english :)

 3 No.3 Revision kcrisman 12052 ●37 ●125 ●245

### generate_plot_points for multiple variable functions and contour_plot

Is there a default sage function to generate all (x,y,f(x,y)) values the program uses to draw a multivariable function or the contours of let's say a f(x,y)=C ? I am new to sage and could only find that generate_plot_points works only for one variable functions.

Example from documentation:

sage: from sage.plot.plot import generate_plot_points
sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0)


I guess one could solve symbolically let's say a contour equation and then create the values i talk about like discussed here:here:

sage: var('x,y')
(x, y)
sage: solve(y^2 - x^3 - x == 0, [y])
[y == -sqrt(x)*sqrt(x^2 + 1), y == sqrt(x)*sqrt(x^2 + 1)]


then just plot each of those two above and combine them. But this could become really cumbersome since one could have a terribly complicated equation. So can this be done currently or someone needs a workaround to achieve this? excuse my english :)

 4 retagged vdelecroix 6922 ●16 ●75 ●150 http://www.labri.fr/pe...

### generate_plot_points for multiple variable functions and contour_plot

Is there a default sage function to generate all (x,y,f(x,y)) values the program uses to draw a multivariable function or the contours of let's say a f(x,y)=C ? I am new to sage and could only find that generate_plot_points works only for one variable functions.

Example from documentation:

sage: from sage.plot.plot import generate_plot_points
sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0)


I guess one could solve symbolically let's say a contour equation and then create the values i talk about like discussed here:

sage: var('x,y')
(x, y)
sage: solve(y^2 - x^3 - x == 0, [y])
[y == -sqrt(x)*sqrt(x^2 + 1), y == sqrt(x)*sqrt(x^2 + 1)]


then just plot each of those two above and combine them. But this could become really cumbersome since one could have a terribly complicated equation. So can this be done currently or someone needs a workaround to achieve this? excuse my english :)