how to get more colors?

42 visualizaciones (últimos 30 días)
bsd
bsd el 10 de Oct. de 2011
Comentada: Steven Lord el 5 de Mayo de 2019
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 comentarios
Matthew Dilsaver
Matthew Dilsaver el 5 de Mayo de 2019
So helpful, thank you!
Steven Lord
Steven Lord el 5 de Mayo de 2019
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.

Iniciar sesión para comentar.

Respuesta aceptada

joeDiHare
joeDiHare el 10 de Oct. de 2011
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

Más respuestas (1)

Walter Roberson
Walter Roberson el 21 de En. de 2014
Consider using the File Exchange contribution "plt"

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by