Draw arrows in UIAxes diagrams in APP Designer

43 ビュー (過去 30 日間)
Patrick Sina
Patrick Sina 2021 年 2 月 9 日
編集済み: Hunk Huang 2022 年 2 月 21 日
I find this Display Graphics in App Designer - MATLAB & Simulink - MathWorks Deutschland and tried it as below with annotation:
Up_x = [0 5];
Up_y = [0 0];
annotation(app.ElectricMachineInfo_UIAxes3,'arrow', Up_x,Up_y);
but it dosent work :D
Can someone help me to drow Arrows in a UI Axes Diagrams to present it in the App designer environment
I use Matlab 2020b.
  1 件のコメント
Hunk Huang
Hunk Huang 2022 年 2 月 21 日
編集済み: Hunk Huang 2022 年 2 月 21 日
quiver(app.UIAxes,0,0,2,0,'b','filled','LineWidth',1)

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

回答 (1 件)

Nitin Kapgate
Nitin Kapgate 2021 年 2 月 12 日
While using the annotation function in App Designer, the First argument (i.e. container) must be a valid annotation type or a handle to a figure, uipanel, or uitab. It can't be a handle to an UIAxes.
  4 件のコメント
Marco Degano
Marco Degano 2021 年 3 月 24 日
編集済み: Marco Degano 2021 年 3 月 24 日
I think I found the solution, try this:
annotation(app.UIFigure,'arrow',[x0 x1],[y0 y1]);
But I can not plot over UIAxes, it goes behind and gets hidden.
Hunk Huang
Hunk Huang 2022 年 2 月 21 日
編集済み: Hunk Huang 2022 年 2 月 21 日
quiver(app.UIAxes,0,0,2,0,'b','filled','LineWidth',1)

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

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by