Reputation: 171
Is it possible to reproduce this graph using the Julia Plots Package? Plotting using gnuplot
x = y = -15:0.4:15
f1 = (x,y) -> @. sin(sqrt(x*x+y*y))/sqrt(x*x+y*y)
surf(x, y, f1, w = :p, marker = "dot", Axes(hidden3d = :on))
Upvotes: 0
Views: 942
Reputation: 3015
Not exactly the same, but you can plot a surface with surface
:
using Plots
x = y = -15:0.4:15
f(x,y) = sin(sqrt(x^2+y^2))/sqrt(x^2+y^2)
surface(x, y, f)
which will give
or a wireframe
wireframe(x, y, f)
will give
But if you really want a 3D scatter, then you need to create the mesh by hand and rearrange the data into vectors I think, like
X = [x for x in x for y in y]
Y = [y for x in x for y in y]
scatter3d(X, Y, f.(X,Y))
Upvotes: 5