How to add the figure toolbar to axes in a gui?
4 ビュー (過去 30 日間)
古いコメントを表示
Hi, I'd like to read your suggestions about a trouble that i'm facing these days. I'm wirting a gui(using the guide), this gui plots some 2D and 3D graphs, now the question is that i'd like to add to those graphs the figure toolbar,giving the user the possibility to zoom in, zoom out, save the figure and so on. I'd like to add the toolbar only to the plotted graphs and not to the entire gui figure. I've tried many different ways, but nothing seems to work. Is it possible to perform this or I have to let go this idea? Thanks for your answers.
0 件のコメント
採用された回答
Jan
2011 年 8 月 5 日
The figure toolbar belongs to a FIGURE. It would be rather confusing, if standard GUI elements are attached to unsual objects -the AXES here-, because GUIs should be as intuitive as possible and follow te usual look-and-feel.
You could create 2 figures, one for the GUI and one for the diagrams. Then the toolbar is attached to the diagram figure only. Another idea is FEX: MenuBar.
その他の回答 (2 件)
Desiree
2011 年 8 月 5 日
The question would be how these additional graphs are created and if they reside in a new figure window. If they reside in a figure you can use this command to set the toolbar: set(hObject,'toolbar','figure'); You will not be able to add the toolbar for an axes in a figure, you can only do this for a whole figure.
0 件のコメント
Rikimaru83
2011 年 8 月 5 日
1 件のコメント
Desiree
2011 年 8 月 5 日
As I already stated you can only associate a toolbar with figures, it's not possible for figure children like axes or uipanel.
You can always workaround this by programming your own buttons and callbacks though.
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!