[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.

Is this a wrong type of way of plotting that function?
mandag 26. juni 2017 13.25.58 UTC+2 skrev Eric Gourgoulhon følgende:
>
>
>
> 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.show()
>>
>> however, this also does not show.
>>
>>
> Works for me, provided the parentheses in the definition of f are well 
> placed:
> def f(x,y):
> return math.sqrt(2**3)*exp(-(x**2 + y**2))
>
> Best wishes,
>
> Eric.
>

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


[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.show()
>
> however, this also does not show.
>
>
Works for me, provided the parentheses in the definition of f are well 
placed:
def f(x,y):
return math.sqrt(2**3)*exp(-(x**2 + y**2))

Best wishes,

Eric.

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