Ask Your Question

Revision history [back]

Hi,

Basically, you have to use the function show() on the graphic object resulting from complex_plot(). Note also the alignment of @interact and def _(n=(1..8)) (alignment is crucial in Python). So the working code is

z,k = var('z,k')
@interact
def _(n=(1..8)):
    g = complex_plot(exp(z)- sum(z^k/factorial(k), k, 0, n), (-5, 5), (-5, 5))
    show(g)