Comet3 is also supported just like comets and animated lines.
Sample MATLAB Code (generates a comet in 3d using comet3
):
[xmat,ymat,zmat] = peaks(50);
xvec = xmat(:);
yvec = ymat(:);
zvec = zmat(:);
p = 0.05;
comet3(xvec,yvec,zvec,p)
This can easily be converted to a Plotly figure using:
pf = fig2plotly(gcf, 'TreatAs', 'comet3', 'FrameDuration', 1, 'FrameTransitionDuration', 0);
Note: FrameDuration=1
(in ms.) and FrameTransitionDuration=0
are set intentionally to get a fast Plotly animation.
This generates the following:
Changing line properties with animated line
Sample MATLAB Code:
h = animatedline('Color', 'r', 'LineWidth', 3);
axis([1,100,1,100]);
for i = 1:100
addpoints(h, i, i);
drawnow
end
fig2plotly()
Generated figure: