Two graphs in the same plot, why?
3 次查看(过去 30 天)
显示 更早的评论
Hi, I imported some data from an xls file, and when plotting it , I obtain two graphs in the plot. Only one is necessary. What is the other and why does it appear?
xlsread('sunHoursInTrollhattan.xlsx')
plot(ans)
xlabel('måned')
ylabel('timer')
title('Soltimar i Trollhattan')
Thanks
0 个评论
采纳的回答
Alan Stevens
2024-1-31
Something like this
data = xlsread('sunHoursInTrollhattan.xlsx');
mins = data(:,1)*60 + data(:,2);
plot(1:12, mins,'o'),grid
更多回答(1 个)
Alan Stevens
2024-1-31
You have the hours as one plot and the minutes as the other!
Turn the data into all minutes, or all hours first.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!