필터 지우기
필터 지우기

how to make the label inside this graph that arrow sin(pi/2) and how to make the grid like tht blurry and no cut line

조회 수: 1 (최근 30일)

답변 (1개)

Chunru
Chunru 2022년 1월 1일
편집: Chunru 2022년 1월 1일
t = linspace(-pi, pi, 41);
x1 = sin(1*t);
x2 = sin(2*t);
plot(t, x1, 'bo-', t, x2, 'r*-');
grid on
pos = get(gca, 'Position');
xPosition = t(31); % 31st point
yPosition = x2(31);
% Coordinates in data units
ta1 = annotation('textarrow',...
[(xPosition +.5 + abs(min(xlim)))/diff(xlim) * pos(3) + pos(1),...
(xPosition + abs(min(xlim)))/diff(xlim) * pos(3) + pos(1) ],...
[(yPosition - min(ylim))/diff(ylim) * pos(4) + pos(2),...
(yPosition - min(ylim))/diff(ylim) * pos(4) + pos(2)]);
text(xPosition +.5 , yPosition, 'sin(\pi t/2)')
legend

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by