How use pcshow in GUI

8 ビュー (過去 30 日間)
Veronica Taurino
Veronica Taurino 2021 年 2 月 25 日
編集済み: Veronica Taurino 2021 年 3 月 2 日
Hi you all!
I would need to use pcshow in a GUI (app design). I tried something like this:
p=pcshow(app.UIAxes, [ptCloud.vertex.x ptCloud.vertex.y ptCloud.vertex.z], ptCloud.vertex.Scalar);
and this:
p=pcshow([ptCloud.vertex.x ptCloud.vertex.y ptCloud.vertex.z], ptCloud.vertex.GKI,'Parent',app.UIAxes);
but it doesn't work.
I also tried scatter3:
p=scatter3(app.UIAxes, ptCloud.vertex.x, ptCloud.vertex.y ,ptCloud.vertex.z, 36, ptCloud.vertex.Scalar);
but it does not work either (the app crashes without giving me any error with this last one).
How can I pass the ''app.UIAxes"? Is there a guide to learn by myself?
Thank you in advance
  16 件のコメント
Adam Danz
Adam Danz 2021 年 2 月 25 日
編集済み: Adam Danz 2021 年 2 月 26 日
Ahhhh.... there we go. I'll reply in the answers section.
Veronica Taurino
Veronica Taurino 2021 年 3 月 2 日
編集済み: Veronica Taurino 2021 年 3 月 2 日
Little update:
I can't make it work with plot3 either, it is too slow. I tried to improve the speed as suggested here:
and using the combination UIFUGURE/AXES instead of UIFIGURE/UIAXES, but it didn't improve my app.
So for now I'm going to use a visual artifact: creating a separate regular figure and aligned it to the command bar. After this delivery to my client, I'm going to use the programmatic way to do the job again, to include the plots tab within the GUI. Hoping in future update to improve the visual outcome of the App Design.
Thank you for your suggestions, greatly appreciated.
Best

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

回答 (1 件)

Adam Danz
Adam Danz 2021 年 2 月 25 日
The error message indicates "Functionality not supported with UIAxes". Also, the documentation for the Parent property in pcshow, also states,
App designer uses UIAxes by default. You could try replacing the UIAxes with regular axes within the startup function of your app though I've never tried that so I'm not fully confident that it would work.
Alternatively you can generate the figure outside of the app in an independent figure using regular axes.
Lastly, perhaps you could substitute pcshow with a different plotting function that is supported by UIAxes. scatter3 or plot3 might work depending on what you're trying to plot, although that doesn't solve the crash problem scatter3 is producing under certain circumstances.

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by