Davide-sd / sympy-plot-backends

An improved plotting module for SymPy
BSD 3-Clause "New" or "Revised" License
44 stars 10 forks source link

Evaluation should be done over the complex range. #19

Closed Davide-sd closed 1 year ago

Davide-sd commented 1 year ago

The following examples fails because the module uses real discretization. It should use complex instead.

from sympy import *
from spb import *
var("x, u")

expr1 = im(sqrt(x) * exp(-x**2))
expr2 = im(sqrt(u * x) * exp(-x**2))
p1 = plot(expr1, adaptive=True)
p2 = plot(expr1, adaptive=False)
p3 = plot(expr2,  (x, -10, 10), params={u: (1, -1, 1))