Home>

It's exactly the same as the title.
I hope you can lend me your help.

Error message

It is displayed in multiple windows.

Applicable source code
import sympy
from sympy.plotting import plot_implicit
x = sympy.Symbol ('x')
y = sympy.Symbol ('y')
a = 3
equation1 = a * x ** 2 + 5/2 * y ** 2-30
equation2 = 6 * x ** 2-5/2 * y ** 2-15
print (sympy.solve ([equation1, equation2]))
plot_implicit (equation1)
plot_implicit (equation2)

Since matplotlib was not enough, it was not enough (two windows are displayed)

Supplemental information (FW/tool version etc.)

Even if it is not sympy, anything is fine as long as you can see the intersection point and display the implicit function at once!

  • Answer # 1

    Try the following.

    import sympy
    from sympy.plotting import plot_implicit
    x = sympy.Symbol ("x")
    y = sympy.Symbol ("y")
    a = 3
    equation1 = a * x ** 2 + 5/2 * y ** 2-30
    equation2 = 6 * x ** 2-5/2 * y ** 2-15
    print (sympy.solve ([equation1, equation2]))
    plot1 = plot_implicit (equation1, line_color = "blue", show = False)
    plot2 = plot_implicit (equation2, line_color = "green", show = False)
    plot1.extend (plot2)
    plot1.show ()

Related articles