How use pcshow in GUI
古いコメントを表示
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 件のコメント
Rik
2021 年 2 月 25 日
I removed your question from the spam quarantine. It is ofte dificult to tell what might have set it off.
The app crashing is strange behavior. If the scatter3 function would not support uiaxes, only axes, I would have expected an error message, not a crash.
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 25 日
Rik
2021 年 2 月 25 日
I had not searched for bugs relating to this, but that would explain why it crashes instead of triggering an error.
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 26 日
Rik
2021 年 2 月 25 日
If you attach your data (or code that will generate some random data), we might be able to help you.
Adam Danz
2021 年 2 月 25 日
It looks like you asked 3 similar questions within a short period of time which may have triggered the spam detector.
Veronica Taurino
2021 年 2 月 25 日
Rik
2021 年 2 月 25 日
I don't think speculation will be very productive. Several people regularly check the spam filter. I hardly ever rescue a question that is older than a day. I think focussing on your actual question would be best. Should any reponse be caught by the spam filter, just flag it.
Do you still have a question?
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 25 日
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 25 日
Rik
2021 年 2 月 25 日
My replies were meant to be consise, I did not mean to impolite either.
As for your question: I tend to test these things as much as I can before spending hours on the visual design. That way you could have already discovered the performance issue in the inital stages of design. My only suggestion will take a lot of time: switch back to a normal figure instead of a uifigure. I would suggest a programmatic design; for general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 25 日
The first line of code in your question,
p=pcshow(app.UIAxes, [ptCloud.vertex.x . . .
is incorrect because pcshow does not accept an axis handles in input #1. That shouldn't crash the app but it should produce an error message (which you should share with us in the future).
The second line,
p=pcshow(. . .,'Parent',app.UIAxes_prova);
looks OK but is app.UIAxes_prova the axis handle? In the first line above, app.UIAxes looks like the axis handle. That should also produce an error message if app.UIAxes_prova is not an axis handle.
The third line also looks OK but may cause problems related to this post: App desiner GUI crashes when use scatter3
Veronica Taurino
2021 年 2 月 25 日
編集済み: Veronica Taurino
2021 年 2 月 25 日
Veronica Taurino
2021 年 3 月 2 日
編集済み: Veronica Taurino
2021 年 3 月 2 日
回答 (1 件)
Adam Danz
2021 年 2 月 25 日
0 投票
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.
カテゴリ
ヘルプ センター および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


