Hi,
I have multiple lines to plot but by defualt they are different color, how to change the color to uniform color?
I tried to do this but failed (see below)
QQ截图20190618140313.png
QQ截图20190618140358.png

 Respuesta aceptada

Adam Danz
Adam Danz el 18 de Jun. de 2019
The line of code that apparently does the plotting is cut off in your image.
Either specify the color during plotting
plot(x,y,'color', 'b');
or set the color later using the output handles
h = plot(x,y);
set(h, 'Color', 'b')

2 comentarios

ZC Song
ZC Song el 18 de Jun. de 2019
Great it works!
Thank you very much!
Adam Danz
Adam Danz el 18 de Jun. de 2019
Glad I could help!

Iniciar sesión para comentar.

Más respuestas (1)

Asher
Asher el 17 de Nov. de 2024
Editada: DGM el 18 de Nov. de 2024
You can try:
plot(x,y,'k')

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Jun. de 2019

Editada:

DGM
el 18 de Nov. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by