매트랩에서 그래프 색, 선 종류, 마커 종류 지정하는 방법
plot option in matlab
표
그래프 색 | 마커 | 선의 형태 |
---|---|---|
빨강 r |
점 . |
실선 - |
초록 g |
별표 * |
점선 : |
파랑 b | x x |
점단선 -. |
검정 k |
원 o (알파벳 오) |
단선 -- |
노랑 y |
+ + |
|
자홍 m |
□ s |
|
하양 w |
◇ d |
|
청록 c |
☆ p |
|
▽ v |
||
△ ^ |
||
◁ < |
||
▷ > |
||
육각별 h |
||
마커 없음 |
예제
x=1:20;
y=x.^3+3.*x.^2+3.*x+1;
figure()
plot(x,y,'ro')
title('ro')
figure()
plot(x,y,'g-')
title('g-')
figure()
plot(x,y,'mo')
title('mo')
figure()
plot(x,y,'c:')
title('c:')
figure()
plot(x,y,'k--')
title('k--')
댓글