My matlab is using same color in drawing multiple lines in figure
11 views (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Archita P
on 20 Mar 2017
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 Comments
More Answers (0)
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!