How to plot a ScatterPlot with different colours for each column?
3 ビュー (過去 30 日間)
古いコメントを表示
I have two 2 x 40 matrices A and B.
I would like each column in A and B to have the same colour on the scatter plot (i.e only 2 points on the plot having the same colour). For some reason the colours are being repeated for multiple colums. Or perhaps these colours are different but difficult to distinguish visually.
How do I plot the data such that each column have a unique visually distinguishable colour?
A=rand(2,40);
B=rand(2,40);
scatter(A,B,'filled')
0 件のコメント
回答 (1 件)
Chunru
2022 年 9 月 5 日
A=rand(2,40);
B=rand(2,40);
%scatter(A,B,'filled')
scatter(A', B', 'filled') % use coloumn oriented data
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!