data cursor to show datestr instead of datenum for a figure created in appdesigner

1 回表示 (過去 30 日間)
Joaquin REYES
Joaquin REYES 2020 年 1 月 28 日
編集済み: Mohammad Sami 2020 年 1 月 29 日
I included a figure in my App (app.UIAxes). The x-axis is a datenum and I did format it to show time (HH:mm) using datetick; however when I use the cursor to go over the plot, the data cursor shows the X value as datenum (Example: 737758.5696).
I don't see how to create callback for the app.UIAxes to call a function to update the values of the data cursor when I move the mouse pointer over the plot.
Thanks for any solution or suggestion.
  1 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 1 月 29 日
編集済み: Mohammad Sami 2020 年 1 月 29 日
If you are using the current version of Matlab >= R2019a, take a look at dataTipTextRow
load('accidents.mat','hwydata','statelabel')
s = scatter(hwydata(:,5),hwydata(:,4));
row = dataTipTextRow('State',statelabel);
s.DataTipTemplate.DataTipRows(end+1) = row;

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by