MATLAB: How to add the figure toolbar to axes in a gui

figure toolbar

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.

Best Answer

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.