MATLAB: Displaying image with push button in GUI

imagematlab guipushbutton

Hi All, At the moment, i am using the commands below in my code for creating an image. i would like to display the same image using the GUI using a pushbutton. The the tag name on the axis I would like to display on is: 'axis_1'. Please can anyone help me with the syntax for the callback?
Thanks in advance.
imh = image(cat(3,cells,z,z);
set(imh, 'erasemode', 'none');
axis equal
axis tight

Best Answer

rgbImage = cat(3, cells,z,z); % 3-D true color image from 2 other gray scale images.
axes(handles.axes_1); % Set current axes to this one.
imshow(rgbImage); % or use image() instead of imshow() if you want.
% Optional stuff:
axis on;
axis equal;
axis tight;
axis image;
title('This image is in axis_1', 'FontSize', 20);