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." prefix from sqrt() and put the brackets at the 
right places.



On Monday, June 26, 2017 at 1:27:45 PM UTC+1, Fjordforsk A/S wrote:
>
> 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),adaptive=True,color=cmsel)
>
> however, it does not work, no matter how the brackets are ordered. Is 
> there a formatting problem here?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to