How to move programmatically existing datatip

11 ビュー (過去 30 日間)
Marat Zhe
Marat Zhe 2020 年 2 月 13 日
編集済み: Matt J 2020 年 2 月 13 日
__1. Hi guy's i have matlab 2017a. I plotted a contour plot and wanted to enter coordinates of datatip using uicontrol edit. Can you help me?
__2. I read similar question's here. Their code doesn't work well. For exhample, they used function "updateDataCursors(cursorMode)". I tried it, but when i go inside of it (f11 in debug mode) matlab go to "findall(HandleList,varargin)" function. Does it mean that MATLAB cant find updateDataCursors?
  1 件のコメント
Marat Zhe
Marat Zhe 2020 年 2 月 13 日
編集済み: Matt J 2020 年 2 月 13 日
Hi everybody. Thank you for your attention. I understood how to resolve my problem. A lot of people (among them Yair Altman) suggested to use
cursorMode = datacursormode(gcf).
and then to use methods of cursorMode
cursorMode.removeDataCursor(cursorMode.CurrentCursor);
H_current_datatip = cursorMode.createDatatip(H_surf);
set(H_current_datatip, 'Position', New_position).
I find errors in my code. And everything now works fine. Thank's to Matt J for his time and interesting link.

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

回答 (1 件)

Matt J
Matt J 2020 年 2 月 13 日
Maybe you can use the advice here,
to programmatically effect a mouse click at the positions you want (with datacursormode on).

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by