MATLAB: Insert a Background without guide

#background #image_gui

Hi,
i need to put a background to my main window i tried this code but it doesn't work
f=figure('Position',get(0,'screensize'));
as=axes('Parent',f,'Position',[400 200 200 150]);
imshow ('Logo.PNG','Parent',as);
Thanks.

Best Answer

f=figure('Position',get(0,'screensize'));
as=axes('Parent',f,'Units', 'pixels', 'Position',[400 200 200 150]);
imshow ('Logo.PNG','Parent',as);
should work. You need to specify the axes units as 'Normalized' is the default.