I'm trying to change the perspective of a 3D scatter plot. (Julia Language)
This code, for example, changes the perspective, but the points are plotted individually with each change, rather than together.
for i=1:10
X=i; Y=i+2; Z = i+3
fig = figure()
ax = gca(projection="3d")
plot3D([X],[Y],[Z], ".")
ax[:view_init](30, 180)
end
How can I write this so that I see all the points together in a changed perspective? The format in Julia is adapted from matplotlib, so it should be very similar to how it is accomplished in Julia.
Just take the figure creation out of the loop. You are creating a new figure in each iteration.
Does that do what you want?