Where in the axes properties (or elsewhere) is the "pointer" on the next color of ColorOrder ?
显示 更早的评论
The command
hold all
holds the current line color in the ColorOrder, so that following plot commands continue cycling through it. This seems to be only a feature of high-level-functions like plot. However, there must be a change in the 'axes properties' (besides the 'NextPlot' property), something like a pointer telling the next plot, which color to be used.
My problem is that I use low-level-function 'line' and want to add another line(s) in the next color of ColorOrder. Is there a more simple way to realize this instead of getting the existing line objects color by some functions as get,findobj and then choosing a non-used color for current line, which could not really considered as cycling.
Thanks.
2 个评论
José-Luis
2013-1-12
You could create your own custom order and cycle through it.
采纳的回答
更多回答(2 个)
Walter Roberson
2013-1-12
getappdata(gca, 'PlotColorIndex')
When it is non-empty, it is the index of the next color to plot.
2 个评论
Walter Roberson
2013-1-12
If I recall correctly, line() does not cause cycling through the color order; it is functionality built into plot()
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!