Closed ramcdougal closed 10 months ago
Following up on our chat today, animatedline may be a useful tool.
Would require a bit of a paradigm shift (pre-creation of the objects, perhaps at Session initialization). Note that Visibility
is one of the properties that can be 'animated'.
I also add my 2 cents about plot performance. High-level functions like plot and plot3 create a graphics object each time they are called and that is expensive. A cool trick to plot 3d-lines that can change color is to "abuse" the patch primitive.
This has good performance because only one object will be created by the patch function
t = linspace(0,2*pi,100);
x = cos(t);
y = sin(t);
z = t;
c = cos(t).^2;
colormap(hsv)
patch(x,y,z,c,'FaceColor','none','EdgeColor','interp')
colorbar
view(3)
If you need discontinous lines then append "nan" at the end of each segment.
Probably linked to #79