listener behavior for axes in uifigure vs. figure

5 ビュー (過去 30 日間)
Paul Keselman
Paul Keselman 2020 年 5 月 6 日
コメント済み: Paul Keselman 2020 年 5 月 21 日
I am trying to overcome a current limitation of UIAxes inside app designer, so I thought I would manually add an Axes to a UIFigure. However, I am getting an unexpected behavior when adding a listener to the XLim property of the axes. When I pan the axes, the listener only fires after the mouse button has been released, not continuously as I would expect. Here is a simple code to reproduce the issue:
hUIFig = uifigure;
hAx = axes(hUIFig, 'OuterPosition', [0,0,1,1]);
addlistener(hAx ,'XLim', 'PostSet', @(~,evnt)disp(evnt.AffectedObject.XLim));
vs the behavior I would expect when the axes is inside a figure
hFig = figure;
hAx = axes(hFig, 'OuterPosition', [0,0,1,1]);
addlistener(hAx ,'XLim', 'PostSet', @(~,evnt)disp(evnt.AffectedObject.XLim));
I am using R2019b.
Is there a way to overcome this limitation?
Thank you.

回答 (1 件)

Jalaj Gambhir
Jalaj Gambhir 2020 年 5 月 21 日
Hi,
The visible difference is because of the way the interactions are implemented differently for figure and uifigure. The concerned parties might be investigating further.
  1 件のコメント
Paul Keselman
Paul Keselman 2020 年 5 月 21 日
Thank you for your reply. Strangely enough if I interact with the ruler, things behaves as expected, so it should not be too hard to fix this bug when interacting with the axes itself.

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

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by