Mesh plot interactive in panel

1 回表示 (過去 30 日間)
N.
N. 2017 年 7 月 3 日
コメント済み: N. 2017 年 7 月 11 日
Hello,
I am trying to display a mesh plot in a panel (by using matlab GUIDE). I can plot the figure but I cannot use the usual tools with mesh (like rotate the figure, see the position of a point etc...). Is that possible?
Here is my code:
smoothRNG = smooth2a(RNGZ_R,5,1); %some function of mine, gives a matrix named smoothRNG
axes('Parent',handles.smoothFig3D,'Position',[0 0 1 1]);
mesh(-smoothRNG);
Thank you for your help!
N.

採用された回答

Shashank
Shashank 2017 年 7 月 11 日
Hi Nora,
When you create a GUI with GUIDE, by default it will remove the toolbar and menubar from the GUI's figure window, by setting the 'Toolbar' and 'Menubar' properties of the figure to 'none'. That's usually a good thing, as there's a lot of functionality available in the figure toolbar and menubar that means it's difficult for you, as the GUI designer, to keep control of the workflow users will experience.
If you just want to make the surf plot rotatable, quickly, you can set the 'Toolbar' property of the figure to 'figure' using set(f, 'Toolbar', 'figure') if you have the handle f of the figure, or set(gcf, 'Toolbar', 'figure') if not - gcf is the handle to the current figure.
A better way would be to leave the toolbar off, and to maybe add a togglebutton uicontrol labelled "Rotate on/off". In the callback of this togglebutton, put some code that calls the command rotate3d on the axis of your surf plot to switch rotation on or off. Maybe do the same for panning, zooming as well. That way you can provide rotation while keeping control of the GUI workflow.
- Shashank
  1 件のコメント
N.
N. 2017 年 7 月 11 日
Thank you so much for your answer !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by