Scatter 3 xlsx plot with an irrigular range of dates
1 次查看(过去 30 天)
显示 更早的评论
Hello ! I want to scatter an csv file with a colorbar (plot 3 parameters). Fro this purpose I ued this program :
figure
date=txt(:,1)
Q=date(2:end)
scatter(Q(:,1),num(:,1),12,num(:,16)),colorbar;
set(gca,'xticklabel',raw(1:length(raw),1))
set(gca,'yticklabel',raw(1:length(raw),2))
xlabel('Date');
ylabel('Latitude');
title ('Temp38');
what does'nt work with an error messg "Error using scatter (line 56) Input arguments must be numeric, datetime, duration or categorical." Because the format of the date is like :
- 2016.03.01 14:39:00
- The step of the date is one minute, but at some level , the date changes literally like from 2016.03.01 17:40:00 to 2016.03.15 16:43:00 (this is due to an assembly of several files but it does not make problem if there is a possibility to make a regular step)
Here is a photo to show the type of data I have (the rest of the data are numeric) :
And you can find attached the file I want to plot. Any Ideas? I will appreciate your help !
0 个评论
采纳的回答
KSSV
2018-9-11
T = readtable('1.xls') ;
x = T.(3) ; % longitude
y = T.(2) ; % latitude
c = T.(4) ;
scatter(x,y,10,c,'filled')
Follow the same with other variables.
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Categorical Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!