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 件のコメント

Adam
Adam 2018 年 6 月 6 日
'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 2018 年 6 月 6 日
the image doesn't appear.
and i want the image to be in specific position.

サインインしてコメントする。

 採用された回答

Adam
Adam 2018 年 6 月 6 日

0 投票

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.

1 件のコメント

Samir Rick
Samir Rick 2018 年 6 月 6 日
Ty, it's working.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDisplay Image についてさらに検索

質問済み:

2018 年 6 月 6 日

コメント済み:

2018 年 6 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by