자료 매번 검색하기 귀찮아서 만든 블로그
MATLAB - 일부 그림에만 범례 붙이기 본문
그림은 그리되, 범례를 넣고싶지 않은 그림이 있을 때 사용
plot(...., 'HandleVisibility', 'off')
예시
a, b, c = rand(10, 1), rand(10, 1), rand(10, 1);
t=1:10;
plot(t,a)
hold on
plot(t, b)
plot(t, c)
yline(0.5)
legend('Fontsize',25)
만약 여기서 yline(0.5) (data4)의 범례를 제거하고 싶으면,
plot(t,a)
hold on
plot(t, b)
plot(t, c)
yline(0.5, 'HandleVisibility','off')
legend('Fontsize',25)
끝
'Matlab' 카테고리의 다른 글
MATLAB - 그림 저장시 크기 (페이지 방향) 지정하기 (0) | 2022.01.21 |
---|---|
MATLAB - fill 사용하기 (band plot 그리기) (0) | 2021.12.27 |
MATLAB - prctile 사용하기 (0) | 2021.12.27 |
MATLAB - readtable 사용하기 (테이블 다루기) (0) | 2021.12.04 |
MATLAB - movefile 사용하기 (파일 이름 일괄 수정) (0) | 2021.12.04 |