How to plot Date on x axis and string on Y axis. Text annonation on Data points

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 件のコメント

In order to use strings on y axis they must be convertable tonnumeric or encodeable as orderable numeric. You have multiple distinct columns, a different quantity per row, and the strings have no obvious numeric representation. How does
{'Chip
sort relative to
message qpkin
?
text(datenumber, ycoordinate, 'text to show')
Walter Roberson
Walter Roberson 2019 年 8 月 2 日
datacursormode with a custom update function.
Walter Roberson
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
Walter Roberson 2020 年 1 月 28 日
It is disappointing that the user chose to remove their discussion, making the topic hard to follow.

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2019 年 8 月 2 日

0 投票

1 件のコメント

KSSV
KSSV 2019 年 8 月 2 日
MATLAB is rich in documentation......you should read from there with lot of exaples.

サインインしてコメントする。

製品

リリース

R2019a

質問済み:

2019 年 8 月 2 日

コメント済み:

2020 年 1 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by