Invisible line and visible markers

8 Ansichten (letzte 30 Tage)
mohammad
mohammad am 12 Jan. 2018
Kommentiert: mohammad am 12 Jan. 2018
Hi, I want to capture a video of moving particles with MATLAB. I found it too slow to generate a single frame by drawing circles or spheres one by one, let alone a video with hundreds of frames. The reason, as I did understand, is manipulation of large number of handles. One workaround is to to use a single line with markers. Markers in this method represent the particles (in 2D or 3D). In this way we can show so many particles (say 5000) with a single handle using below command:
h1=plot3(x(:,T),z(:,T),y(:,T),'-ko', 'LineWidth', .01, 'Color', 'b', 'MarkerEdgeColor', 'k', 'MarkerFaceColor', 'b', 'MarkerSize', 15);
In this way duration of video generation drops from hours to seconds. The problem here is the connecting line between markers.If I change the color of the line to either white or blue, that would make some visual interference in the frames. Is there any way to make the line invisible while keeping markers visible. Thanks

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Jan. 2018
Change the '-ko' to 'o' . When you specify a marker shape but do not specify '-' or similar, that is the same thing as using 'LineStyle', 'none'.
The 'k' part is not needed: it sets the line to black, but your 'Color', 'b' overrides that, so you might as well leave out the 'k'

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by