How to plot Date on x axis and string on Y axis. Text annonation on Data points
3 次查看(过去 30 天)
显示 更早的评论
Attacched excel sheet has the Date and string. I want to plot Time on x axis and string message on the y axis.
I want Text Annotations plots.
Thanks
5 个评论
Walter Roberson
2019-8-3
Inside the callback, get axes CurrentPoint. Extract the x from that and find the closest x in the data. Use that to pull out the strings from the table. Return a cell array of character vectors; each entry will become a separate line in the datatip shown.
I am not going to do an implementation for you, as the result is going to look pretty poor. With that data, I believe that the kind of graph that is being proposed is nearly meaningless.
Walter Roberson
2020-1-28
It is disappointing that the user chose to remove their discussion, making the topic hard to follow.
回答(1 个)
KSSV
2019-8-2
Load data from excel to matlab using xlsread.
Use this to use labels along the axes:
Use this for dates
1 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!