[sage-support] Re: Plotting complex functions in imaginary and real parts

2017-06-26 Thread Dima Pasechnik
the following works for me: sage: var('x y'); : cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)] : plot3d(lambda x,y:((1/(sqrt((2**2)*pi)))*(x+I*y)*exp(-((0.25)*((x+I*y)**2.imag_part(),(x,-3*pi,3*pi),(y,0,2),adaptive=True, : color=cmsel) Note that I removed "math." pr

[sage-support] Re: Plotting complex functions in imaginary and real parts

2017-06-26 Thread Fjordforsk A/S
Note, that when brackets are corrected it gives the following result: TypeError Traceback (most recent call last) in () > 1 plot3d(lambda x,y:(Integer(1)/(math.sqrt((Integer(2)**Integer(2))*pi)))*(x+I*y)*exp(-((RealNumber('0.25'))*((x+I*y)**Integer(2.imag_

[sage-support] Plotting complex functions in imaginary and real parts

2017-06-26 Thread Fjordforsk A/S
Hi, I tried to use a command found online for plotting complex and real components of a function: var('x y'); cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)] plot3d(lambda x,y:(1/(math.sqrt((2**2)*pi)))*(x+I*y)*exp(-((0.25)*((x+I*y)**2.imag_part(),(x,-3*pi,3*pi),(y,0,2),adaptiv

[sage-support] Re: Further on plotting functions

2017-06-26 Thread Fjordforsk A/S
Thanks, that fixed it. Trying this variant with colors: var('x y'); cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)] plot3d(lambda x,y:(1/(math.sqrt(2**2)*pi))*(x+I*y)*exp(-(0.25)((x+I*y)**2)),(x,-2*pi,2*pi),(y,-2*pi,2*pi),adaptive=True,color=cmsel) But something stops here. I

[sage-support] Re: Further on plotting functions

2017-06-26 Thread Eric Gourgoulhon
Le lundi 26 juin 2017 13:05:27 UTC+2, Fjordforsk A/S a écrit : > > Hello, I tried a different variant of the previous plot: > > def f(x,y): > return math.sqrt(2**3))*exp(-(x**2 + y**2) > P = plot3d(f,(-3,3),(-3,3), adaptive=True, color=rainbow(60, 'rgbtuple'), > max_bend=.1, max_depth=15) > P.sh

[sage-support] Re: Plottig functions

2017-06-26 Thread Eric Gourgoulhon
Hi, Le lundi 26 juin 2017 12:31:44 UTC+2, Fjordforsk A/S a écrit : > > Hello, I am having trouble plotting this function: > > sage: plot3d((math.sqrt(2**3))*math.exp(-(x**2 + y**2)), (x, 0, 5 ), (y, > 0, 5)) > > > Do not use the exp from the math module, but directly Sage's function exp: plot3d

[sage-support] Further on plotting functions

2017-06-26 Thread Fjordforsk A/S
Hello, I tried a different variant of the previous plot: def f(x,y): return math.sqrt(2**3))*exp(-(x**2 + y**2) P = plot3d(f,(-3,3),(-3,3), adaptive=True, color=rainbow(60, 'rgbtuple'), max_bend=.1, max_depth=15) P.show() however, this also does not show. -- You received this message because

[sage-support] Plottig functions

2017-06-26 Thread Fjordforsk A/S
Hello, I am having trouble plotting this function: sage: plot3d((math.sqrt(2**3))*math.exp(-(x**2 + y**2)), (x, 0, 5 ), (y, 0, 5)) plot3d((math.sqrt(Integer(2)**Integer(3)))*math.exp(-(x**Integer(2) + y**Integer(2))), (x, Integer(0), Integer(5) ), (y, Integer(0), Integer(5))) /home/sem/SageMa