MATLAB: Image as a background of a uicontrol or uipanel

guiMATLABuicontroluipanel

Hi, I am trying to make a UI that will work with my script. The goal is to use an image as a background and place buttons ontop of the image so that I can route to different parts of my script from there. Similar to a website design in terms of navigation. I am having a hard time getting my image to show up. any ideas on how i can do that in a uicontrol or uipanel? I have not found any good tutorials or discussions that show this.

Best Answer

You cannot get an image to show up in uipanel, except by grabbing its JavaFrame and manipulating that.
You cannot get an image to show up on uicontrol, except for styles pushbutton, togglebutton, radiobutton, or checkbox, in which case the image would be displayed where the button would normally appear.
What you need to do is put up an axes, and then carefully position your ui controls over the axes. There will not be any connection between the axes and the controls: you cannot, for example, configure the controls to be relative to the axes position, or in data units: you can just have the coincidence of them happening to be in the same portion of the figure.