My matlab is using same color in drawing multiple lines in figure

12 次查看(过去 30 天)
2014a version
figure hold plot(a,b) plot(c,d)
The colors of two lines are same pure blue.
Why doesn't color change? How can I fix this issue?
Thanks

采纳的回答

Archita P
Archita P 2017-3-20
There was a major Graphics update from MATLAB R2014a TO R2014b. In R2014a and earlier, the "hold on" command does not retain the current color so new plots added to the axes start from the beginning of the color order. Visually, this means that new plots use the same initial color. Starting in R2014b, the "hold on" command retains the current color so that new plots added to the axes use the next colors in the color order.
Plotting multiple lines with "hold on" uses the next color in the color order instead of starting from the first color with each plotting command starting from MATLAB R2104b.
You can refer to the following link for more information (under topic "Graphics->Compatibility considerations for graphics changes")-
https://www.mathworks.com/help/matlab/release-notes.html?rntext=&startrelease=R2014a&endrelease=R2014b&groupby=release&sortby=descending&searchHighlight=

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by