I have 2 axes on a GUI. How to show the cursor on both plots at the same X axis value?

2 ビュー (過去 30 日間)
Hello,
I have a GUI with two diferent axes with ploted data.
I can activate the cursor but only on one of them. I want to show the cursor on both axes and at the same X value.
Of course if I change the position of the cursor on one of axes, I want the cursor on the other plot to change to the same X position.
Many thanks!

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 11 月 27 日
  3 件のコメント
Dani Tormo
Dani Tormo 2012 年 11 月 29 日
編集済み: Dani Tormo 2012 年 11 月 30 日
This hide all the data cursors:
a = findall(gcf, 'Type', 'hggroup');
set(a, 'Visible', 'off');
Now only left how to handle the axes to use the makedatatip without plotting.
This is how I'm doing it now, but when the plotting function finishes, I can't use again the handles.hPlot without plotting:
hPlot = plot(data);
makedatatip(hPlot, [1 3]);
Any idea?
Sean de Wolski
Sean de Wolski 2012 年 11 月 29 日
Use the datatip's delete method:
hDatatip = makedatatip(hobj,pos);
To remove it:
delete(hDatatip)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

製品


Translated by