MATLAB: How can I add picture and plot graphic in the same axes in MATLAB GUI

MATLABmatlab gui

how can I add picture and plot graphic in the same axes in MATLAB GUI

Best Answer

% some random data
x = rand(10,1) ;
y = rand(10,1) ;
% Read the image
I = imread('trees.tif) ;
image([min(x) max(x)], [min(y) max(y)],I); % show th eimage with limits defined in data
hold on
plot(x,y,'r')