LineWidth adding square dimensional.

1 view (last 30 days)
Steinar Bråten
Steinar Bråten on 20 Apr 2016
Commented: Steinar Bråten on 2 May 2016
MatLab R2015a, OSX
This command:
FL=animatedline('LineWidth',5)
Compare to:
FL=animatedline('LineWidth',25)
Gives FL 25 size both x and y direction.
Meaning it never shows smaller than 25 y direction, and visually never 'goes away'.
Why?

Answers (1)

Arnab Sen
Arnab Sen on 27 Apr 2016
Hi Steinar ,
I think you are missing the coordinate the point for which you want to join by the line. The commands you have provided gives only the axes and line width of the axes does not change with parameter. For example, you may try the following for illustration:
>> FL=animatedline([1 2],[15 16],'LineWidth',5,'LineStyle','-')
as compared to
>>FL=animatedline([1 2],[15 16],'LineWidth',25,'LineStyle','--')
You may consider contacting MathWorks Technical Support of you region if you have more assistance.
  1 Comment
Steinar Bråten
Steinar Bråten on 2 May 2016
Sorry, here are som more info.:
forcevector=animatedline('LineWidth',5,'color','b');
clearpoints(forcevector);
FrontLine=animatedline('LineWidth',25,'color','blue');
clearpoints(FrontLine);
BackLine=animatedline( 'LineWidth',25,'color','red');
clearpoints(BackLine);
for i=1 : 20 : length(Fres) addpoints(forcevector,[ResX Fres(i,1)+ResX],[ResY Fres(i,2)+ResY]) drawnow
addpoints(FrontLine,[FrontX FrontX],[FrontY Front2(i)+FrontY])
drawnow
addpoints(BackLine,[BackX BackX],[BackY Back2(i)+BackY])
drawnow
M = getframe(gca);
writeVideo(mov,M);
clearpoints(forcevector);
clearpoints(FrontLine);
clearpoints(BackLine);
end
But the line's are squared in size, not only width...

Sign in to comment.

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!