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
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_
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
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
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
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
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
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