How to set line style and color of a line?

121 views (last 30 days)
Mr M.
Mr M. on 28 May 2015
Answered: Sean de Wolski on 28 May 2015
I can draw a line with the command line(0,10,5,5), but how to set line style and color?

Answers (1)

Sean de Wolski
Sean de Wolski on 28 May 2015
line([0,10],[5,5],'LineStyle',':','Color','r')
And for more info
doc line

Categories

Find more on Graphics Object Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!