How to plot curves sequentially with different colours automatically?
조회 수: 9 (최근 30일)
이전 댓글 표시
I would like to plot curves with a for cycle and with the "hold on" solution, but it would be nice if the curves have different colours but continuously changing colour scheme.
댓글 수: 0
답변 (1개)
Joseph Cheng
2015년 5월 19일
you can define the colors based on the number of plotted lines. see example:
x= randi(1000,10,100);
clist = colormap(hsv(10));
figure,hold on
for ind = 1:10
plot(x(ind,:),'color',clist(ind,:))
end
legend show
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Smoothing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!