how to get more colors?

조회 수: 33 (최근 30일)
bsd
bsd 2011년 10월 10일
댓글: Steven Lord 2019년 5월 5일
Hai,
I have used all the colors viz. 'y','m','c','r','g','b','w' and 'k' in matlab to draw lines. I need to draw some more lines with different colors, other than the above colors. How could I get more colors to draw lines? Looking for your reply.
BSD
  댓글 수: 3
Matthew Dilsaver
Matthew Dilsaver 2019년 5월 5일
So helpful, thank you!
Steven Lord
Steven Lord 2019년 5월 5일
FYI the uisetcolor tool in MATLAB will allow you to select a color interactively and return the RGB value you can use to set the 'Color' property of a graphics object.

댓글을 달려면 로그인하십시오.

채택된 답변

joeDiHare
joeDiHare 2011년 10월 10일
You can use the option 'Color' and then chosing any combination of randon numbers (between 0 and 1) which form a triplet, e.g. [0.1 0.3 0.5]. This will give a combination of saturation for Red, Green and Blue, that as you may know, can be combined to give almost any color (RGB system).
syntax would be plot(t,x,'Color',[rand rand rand])
Stefano

추가 답변 (1개)

Walter Roberson
Walter Roberson 2014년 1월 21일
Consider using the File Exchange contribution "plt"

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by