Scatter Color Scale for Looping Script
古いコメントを表示
Dear everyone,
I have some excel files. Each file containing some columns of parameter. I want to plot all of them in one graph with different color (let's say jet colormap).
Here is my code:
A = dir('*.xlsx');
numprof = length(A); %number of profile
couleur = jet(numprof);
hold on;
for nn = 1:numprof
filename = A(nn).name;
data = xlsread(filename); %
a = data(:,1);
b = data(:,2);
% Plot
scatter(lon(1),lat(1),'filled','color',couleur(nn,:)); % plot the first row value from each excel file
end
legend(compose("% d", 1:numprof),'Location','eastoutside');
This code produce this:

The scatter colors did not following jet colormap. Does anyone know the line I should add in this script?
best regards,
2 件のコメント
Dyuman Joshi
2023 年 10 月 6 日
The behaviour/functionality of scatter() is different than plot().
To clarify, you are trying to plot the first pair of points from each file?
Adi Purwandana
2023 年 10 月 6 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!