Color code with dash line
조회 수: 47 (최근 30일)
이전 댓글 표시
Hi,
Could you please tell me the correct code for the dash line with specific color
For colors with dash line such as red and blue, the code can be written as follows:
plot (x,y, 'r:');
my question here is about the above command but for specific color code as stated below:
plot (x,y, 'color',[0 0.5 0]);
Thanks,
댓글 수: 0
채택된 답변
Matz Johansson Bergström
2014년 8월 24일
x=1:10; plot(x, cos(x), ':','color',[0,0.5,0],'linewidth',3)
댓글 수: 2
Matz Johansson Bergström
2014년 8월 24일
I added 'linewidth' because it is difficult to see otherwise. I don't like the dash, I use -- instead, looks nicer when you use a larger linewidth.
Image Analyst
2014년 8월 24일
편집: Image Analyst
2014년 8월 24일
UTS's "Answer" moved here since it's not an "Answer" to the original post:
Thanks a lot.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!