Refresh plot using switch case with dropdown menu in App designer

Hi everyone,
I have designed an app, which has a drop down menu to select what will be ploted and it works fine. I want to improve the app, so that when I change the value of X or Y lim in numeric fields it will be automatically refreshed. For now, after changing the value in the numeric field I have to select again the same plot in my dropdown menu, to see the plot with the new limits for both axes.
For the limits on the X and Y Axes I am using following commands:
xlim(app.UIAxes, [app.Xmin app.Xmax])
ylim(app.UIAxes, [app.Ymin app.Ymax])
for this app I should avoid using the timer function. Is there another way to refresh the Axes and see the plot with the new limit?
Thank you!

1 件のコメント

Mohd Aaquib
Mohd Aaquib 2023 年 8 月 4 日
Hi, any resolution for this? Im facing this too

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

回答 (1 件)

Cris LaPierre
Cris LaPierre 2023 年 8 月 4 日

0 投票

Add the code you want to run when you interact with a control to the callback functino for that component.All callbacks are functions, so you can call a callback from another callback.
Here, it sounds like you need to call the plot callback function from the edit field callbacks.

カテゴリ

ヘルプ センター および File Exchange で Develop Apps Using App Designer についてさらに検索

質問済み:

2022 年 1 月 10 日

回答済み:

2023 年 8 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by