以下のネタは https://mathtod.online/@satie/263761 より
# 以下は必ず実行しておく. PyPlot も宣言しておかないと、plot_implict で kernel が死ぬ.
using SymPy
using PyPlot
# 数式処理用の変数を宣言
@vars x y
(x,y)
f=x*(x^2-1)*(x^2-4)*(x^2-9)*(x^2-16)-(1+0/10)*y*(y^2-1)*(y^2-4)*(y^2-9)*(y^2-16)
plot_implicit(f,(x,-10,10),(y,-10,10))
PyObject <sympy.plotting.plot.Plot object at 0x000000001F630DD8>
g=x*(x^2-1)*(x^2-4)*(x^2-9)*(x^2-16)-(1+5/10)*y*(y^2-1)*(y^2-4)*(y^2-9)*(y^2-16)
plot_implicit(g,(x,-10,10),(y,-10,10))
PyObject <sympy.plotting.plot.Plot object at 0x000000001F656208>