El lunes, 1 de diciembre de 2014 08:07:10 UTC-6, Giacomo Kresak escribió:
>
>
>
> Bonjour,
> Trying to get a 3D (or surface) plot  of a point spread function (Bessel 
> function of order one) using PyPlot: 
>
> In[ ]:   v(tx, ty) = sqrt((1600*pi*tx/(41253*l))^2 + 
> (1600*pi*ty/(41253*l))^2)
> In[ ]:   o(tx, ty) = (2*besselj1(v(tx,ty)) / v(tx,ty))^2
>
> In[ ]: using PyPlot
>         using PyCall
>

`using PyPlot` automatically loads `PyCall` as well.

 

>
> Do you know if plt.plot is the good way to go? Not able to use plot3d or 
> plot3D with Julia (PyPlot)! 
> Do you know if such command is available?  Thanks, G.
>

In the REPL (terminal) or in IJulia you can do

`plot<TAB>`

to see a list of the commands starting with `plot`.

If you do this after `using PyPlot`, you will find a list that includes 
`plot3D` (note the capitalization).
You can do `?plot3D` to get some (unfortunately still rather minimal) 
information about the function. 

This is for plotting lines in 3D. There is also `surf` for plotting 
surfaces in 3D, that is a wrapper around the matplotlib function with the 
same name.

You can also search this mailing list and the resources on
the Julia home page for examples.

Hope that helps.
David.

Reply via email to