How do I display custom text for the data cursor?
古いコメントを表示
I want to customize the text that is displayed in the text box when I use the data cursor tool.
I want to use my own labels instead of the standard X and Y coordinates that are being displayed. How do I do this?
採用された回答
その他の回答 (1 件)
Giuseppe Naselli
2018 年 3 月 28 日
編集済み: Giuseppe Naselli
2018 年 3 月 28 日
0 投票
Hi, thanks for this but the explanation is a bit vague.
- Could you please explain a bit better where the display_risk.m needs to be saved?
- And if we want to include it in a stand-alone function that is shared with others?
- is there a way of making the display_risk function to read data from the workspace?
- In other words, suppose I want to create a function that has x,y,z as inputs where x = coordinate x,y = coordinate y,z = text to be displayed when the cursor clicks on the corresponding point
Thanks in advance G
1 件のコメント
Steven Lord
2018 年 3 月 28 日
編集済み: MathWorks Support Team
2021 年 4 月 19 日
The third example on the documentation page for the datacursormode function shows how to set a custom data cursor update function programmatically. Since you say you want to "include it in a stand-alone function that is shared with others" that may be easier for your application.
カテゴリ
ヘルプ センター および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!