insert a Background without guide

2 Ansichten (letzte 30 Tage)
Samir Rick
Samir Rick am 6 Jun. 2018
Kommentiert: Samir Rick am 6 Jun. 2018
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.
  2 Kommentare
Adam
Adam am 6 Jun. 2018
'doesn't work' in what way? Do you mean you want the logo to be the background? And if so what are you defining as background? You explicitly position your axes in a very specific location and size so it won't be a background to the rest of the figure anyway.
Samir Rick
Samir Rick am 6 Jun. 2018
the image doesn't appear.
and i want the image to be in specific position.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Adam
Adam am 6 Jun. 2018
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.

Weitere Antworten (0)

Kategorien

Mehr zu Display Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by