Decision
@EdSmith works great. However, I have another suggestion. You can use the contour graph. You can rewrite your function as f(x, y)=0 and then use this code
from numpy import mgrid, pi import matplotlib.pyplot as plt def ezplot(f): x, y = mgrid[-2*pi:2*pi:51, -2*pi:2*pi:51] z = f(x, y) ezplt = plt.contour(x, y, f, 0, colors='k') return ezplt
This is the main idea. Of course, you can generalize it as a function in MATLAB, for example, common intervals x and y , passing the function as a string, etc.
source share