Ask Your Question

JacobsonRadical's profile - activity

2019-02-13 19:55:54 -0500 asked a question __init__() takes exactly 5 arguments (4 given) error in contour plot

I am trying to make a contour plot of a complex valued function. Let say it is g(z).

I have imported the complex root and ContourPlot command by doing following:

from sage.rings.polynomial.complex_roots import complex_roots
from sage.plot.contour_plot import ContourPlot

I have even successfully plot the 3d-Plot, but I encountered an error stating:

__init__() takes exactly 5 arguments (4 given)

My command is:

C=ContourPlot(lambda x,y:float(green(x+y*I)),(-5,5),(-5,5))

It seems that I did not miss the fifth argument, I tried to add in some commands, such as plot_points, but then Sage said it did not expect these commands..

What did I miss? Thank you!!

2019-02-13 19:55:54 -0500 asked a question Conditional Plot, plot f(x+iy) if g(x+iy) satisfies some kind of condition

Let's say I have two functions f(zeta) and g(zeta), and I'd like to have 3D-plot and Contour Plot of f(zeta) if g(zeta) in a certain range.

I have defined f(zeta) and g(zeta), and then I tried this command, but Sage said the syntax is not valid.

B=implicit_plot(lambda x,y : float(f(x+y*I)),if 1<g(x+y*I)<3,(-5,5),(-5,5)))

I am pretty new with Sage math, so please bear with me if the question is too trivial....