Color code with dash line

90 views (last 30 days)
UTS
UTS on 24 Aug 2014
Edited: Image Analyst on 24 Aug 2014
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,

Accepted Answer

Matz Johansson Bergström
Matz Johansson Bergström on 24 Aug 2014
x=1:10; plot(x, cos(x), ':','color',[0,0.5,0],'linewidth',3)
  2 Comments
Image Analyst
Image Analyst on 24 Aug 2014
Edited: Image Analyst on 24 Aug 2014
UTS's "Answer" moved here since it's not an "Answer" to the original post:
Thanks a lot.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!