MATLAB: How to define an axis in other figure to plot in it
axes
how to define an axes in other figure to plot in it WITH A CALLBACK OF PUSHBOUTON IN THE OTHER FIGURE NB:AXES2 IN FIGURE2 PUSH BUTON IN FIGURE ON
Best Answer
figure; hAxes = gca;
plot( hAxes,... )
allows you to plot on a different axes and is recommended anyway (giving an explicit axes handle) rather than relying on whatever the current axes happens to be.
When you call IMAGE, many axes properties are cleared. So after you call IMAGE, set the tag.
image(rgb);
axis off
set(hObject,'tag','mytag') % Set the tag to whatever you want
The other alternative would be to set the nextplot property to replacechildren. This will avoid resetting all the properties with calling IMAGE. See the doc on axes properties.
Best Answer