I've created a MATLAB GUI interface in which there are buttons and a small axes object on the right side of the window. Then, when I click a button I want to plot on this area represented with the axes object. If I use instruction like plot, plot3 in the callback everything goes fine. The problem is that if I use instructions like surf, patch, or mesh I obtain the desired figure but in the center of the window and not on the object axes already created. Seems like the current figure is the window with all buttons and stuff. I don't understand which is my mistake. Someone can help me?
To understan the problem I've created a MATLAB GUI window with an axes object. Then ,I've used the matlab example :
k = 5;
n = 2^k-1;
[x,y,z] = sphere(n);
c = hadamard(2^k);
surf(x,y,z,c);
just to draw something. The result is that the 3d figure appears at the center of the window and not in the object axes zone. Any suggestions? Thanks and best regards
Marco