How to change the curves to same colour when using hold on
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Shan Chu
el 19 de Mayo de 2016
Respondida: Star Strider
el 19 de Mayo de 2016
Dear all, I am using a for-loop and hold on to plot a graph. As usual, Matlab automatically change the colour of legends but I want to keep all the legends in the same colour. Could you please help Thanks
0 comentarios
Respuesta aceptada
Star Strider
el 19 de Mayo de 2016
Specify the colours in each plot call:
figure(1)
plot(x(1,:), y(1,:), '-k')
hold on
for k1 = 2:N
plot(x(k1,:), y(k1,:), '-k')
end
hold off
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!