How do I have different colours for each plot even having a different option in the popupmenu
3 ビュー (過去 30 日間)
古いコメントを表示
I have created a GUI to plot data for 2 sensors using popupmenu to choose which sensor to plot in a single axes. Each sensor have 2 column of data, so total of 4 columns' data. I want to plot such that each column's data have different colours. Sensor 1 will have 2 column of data where one should be in red and yellow while in sensor 2 will have 2 column's data where the colours are blue and black
0 件のコメント
回答 (1 件)
KSSV
2021 年 11 月 27 日
x = (1:10)' ;
A = rand(10,3) ;
figure
plot(x,A(:,1),'r',x,A(:,2),'b',x,A(:,3),'g')
figure
plot(x,A)
figure
hold on
plot(x,A(:,1),'r')
plot(x,A(:,2),'b')
plot(x,A(:,3),'g')
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



