plotting multiple graphs in different colors with a single command
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a matrix of size 500 x 11, each column represents a particle evolving over time (rows). I want to plot all particles in a single command,
for n = 1:11
plot(1:length, [distance_from_herder(1:length,n)])
hold on
end
But I want each plot to have a separate colour from each other. How do I add the colors in this command?
1 个评论
Stephen23
2017-8-9
"But I want each plot to have a separate colour from each other."
That is exactly what plot does when you call it once with the required data. Did you try that?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!