Matplotlib或Sympy - 隐含的不平等或关系

时间:2014-02-04 10:13:01

标签: matplotlib sympy

matplotlib可以用蓝色绘制x^2+y^2<=2之类的关系,然后用红色绘制x^2+y^2<=1+0.5*sin((x^3+y^3)*2pi)吗?

1 个答案:

答案 0 :(得分:1)

您应该查看sympy中的plot_implicit

>>> from sympy import plot_implicit, sin, symbols, pi
>>> x, y = symbols('x y')
>>> my_plot = plot_implicit(x**2 + y**2 <= 1 + 0.5 * sin((x**3 + y**3) * 2 * pi))

enter image description here