line color in figure
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'd like to change the color of the diagonal axis. Please look at the picture below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160265/image.jpeg)
1 Kommentar
Jan
am 30 Jan. 2017
Which line is "the diagonal axis"? Please post your code and explain, what you have tried so far. Thanks.
Antworten (1)
Stephen23
am 30 Jan. 2017
Bearbeitet: Stephen23
am 30 Jan. 2017
If you plot all of the lines at once then they will automatically be colored using the axes ColorOrder:
N = 16;
A = linspace(0,pi,N);
X = cos(A);
Y = sin(A);
X(2,:) = 0;
Y(2,:) = 0;
plot(X,Y)
axis equal
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176937/image.png)
The documentation explains how the ColorOrder can be changed:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Colormaps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!