Question

Can matplotlib draw relations like x^2+y^2<=2 in blue and then x^2+y^2<=1+0.5*sin((x^3+y^3)*2pi) in red ?

Was it helpful?

Solution

You should look at plot_implicit in sympy.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top