Hi..I would like to plot a 2D plot for 15 to 20 data points with 15 to 20 different color ..how can I do it?
1 次查看(过去 30 天)
显示 更早的评论
Harini pushparaj
2017-11-11
回答: Kaushik Lakshminarasimhan
2017-11-11
Hi I want to know how to plot a graph with different color.If you see in the file i have attached ,I have already plotted with 7 colors but,I want to plot with 20 different data with 20 different color.Kindly help me on this.Thank you in advance !!!
0 个评论
采纳的回答
Kaushik Lakshminarasimhan
2017-11-11
Nswarms = 20;
cmap = colormap(jet(Nswarms));
for i=1:Nswarms
hold on; plot(tictoc(i),Jopt(i),'*','Color',cmap(i,:));
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!