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!