How to increase line width of a comet plot

11 views (last 30 days)
Trying to increase the linewidth of a comet plot.

Answers (1)

Walter Roberson
Walter Roberson on 6 Dec 2022
Unfortunately there is no provision for that.
The code creates graphics objects with Tag 'head' (line object), 'tail' (animated line), and 'body' (animated line), but does not have any option to pass in or control sizes, and it runs the complete animation loop before returning.
What you can do is,
set(groot,'DefaultAnimatedLineLineWidth', SIZE)
and then call comet(), and then set it back again afterwards.
In theory you could set the axes default instead of groot default, but you probably need to "hold on" the axes for that to work.

Categories

Find more on Animation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!