필터 지우기
필터 지우기

'LineWidth' parameter not affecting marker thickness of animated line

조회 수: 4 (최근 30일)
Jack Kirby
Jack Kirby 2020년 11월 28일
댓글: Jack Kirby 2020년 11월 30일
I was wanting to plot an animated line with markers of greater thickness than the default. I was expecting the 'LineWidth' parameter to do this.
However the thickness of the markers is not seemingly affected by the 'LineWidth' parameter, although the line thickness is. This differs the the behaviour of a non-animated line. I have included an example below to demonstrate the behaviour.
Is there another parameter I am missing for animated lines, can they not support this behaviour, or is this a bug?
% Plot the same graph, using same parameters, one using an animated line, and the other using a non-animated line.
x = -10:10;
y = x.^2;
% Marker thickness not affected by LineWidth for AnimatedLine (unexpected behaviour)
subplot(1, 2, 1);
title("Animated Line");
h = animatedline(x, y, 'Marker', 'o', 'LineWidth', 2, 'Color', 'k');
% Marker thickness is affected by LineWidth for Line (expected behaviour)
subplot(1, 2, 2);
f = plot(x, y, 'Marker', 'o', 'LineWidth', 2, 'Color', 'k');
title("Line");

답변 (1개)

Sindar
Sindar 2020년 11월 30일
According to the documentation, 'LineWidth' should change the markers as well, so it may be a bug. Regardless, try 'MarkerSize' (default is 6)
  댓글 수: 3
Sindar
Sindar 2020년 11월 30일
Ah, yeah, I remember that... most of the time, edge thickness is a fine substitute for marker size, but I've been frustrated in the past that I can't separately control the marker and line edge thicknesses.
But, given your tests and that the documentation for these parameters is the same for Line and AnimatedLine, I'm calling bug
Jack Kirby
Jack Kirby 2020년 11월 30일
Thanks for your confirmation, I will go ahead and report it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by