Zoom feature using mouse in app designer stopped working

7 ビュー (過去 30 日間)
Vitek Stepien
Vitek Stepien 2022 年 8 月 11 日
コメント済み: Vitek Stepien 2023 年 12 月 1 日
Hi,
I have an app written in App Designer, and recently the Zoom tool stopped working. When I try to Zoom in to a specific section of the plot, or to a sepcific horizontal or vertical section, MATLAB draws the Zoom area but doesn't Zoom, and the drawn Zoom region indicator remains on the plot (see image below for a visual).
I recently switched from 2021a to 2022b, not sure if that could be the reason. In the code I have the following lines for the plot:
app.UIAxes1.Toolbar.Visible = 'off';
app.UIAxes1.Toolbar.Visible = 'on';
These two lines are one right after the other, because without them sometime the toolbar would disappear after the plot shows up. This helps bring the toolbar back, and until recently I haven't had the problem with broken Zoom so I don't think this is a problem.
Please let me know if anyone experienced something similar or if you have ideas how to try and fix it.

回答 (1 件)

Nipun
Nipun 2023 年 9 月 22 日
Hi Vitek,
I understand that the zoom tool in the toolbar is not working for MATLAB app designer.
I tried creating a sine plot in MATLAB App Designer R2023a and the zoom tool is working as expected. I recommend updating to the latest version. Additionally, I suggest creating a simple ML app plot to test out the zoom feature. This should solve the problem. You may also turn on pan and zoom for the axes using the code below (R2017-2018)
pan(app.UIAxes1,'on'); % or 'off'
zoom(app.UIAxes1,'on'); % or 'off'
Starting R2018b, these options were enabled by default. Hope this helps.
Regards,
Nipun
  1 件のコメント
Vitek Stepien
Vitek Stepien 2023 年 12 月 1 日
Hi Nipun,
Not exactly, the tool works to begein with but freezes every now and then with too much data on the plot, and behaves like I described above. It looks like it's 'overloaded' and doesn't function properly anymore

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

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by