>On Jan 28, 2009, at 8:26 AM, projet...@club-internet.fr wrote:
>
>> I'm looking a solution for ploting relation like f(x;y)=0.
>
>I usually just contour the function over the region.  E.g.,
>
> >>> import numpy as np
> >>> import matplotlib.pyplot as plt
> >>> x, y = mgrid[-10:10:50j, -10:10:50j]
> >>> f = x**3 * y - 3.0
> >>> contour(x, y, f, (0,))
>
>The fourth argument to contour is a list of contours to plot, here  
>only zero.
>
>-Rob



Thanks, this works well with the following minor changes.

import numpy as np 
import matplotlib.pyplot as plt 
x, y = np.mgrid[-10:10:50j, -10:10:50j] 
f = x*np.sin(y) + y * np.sin(x) -4.0 
plt.contour(x, y, f, (0,))
plt.show()


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to