フィルターのクリア

Why does imshow change position of a figure?

7 ビュー (過去 30 日間)
LucasH
LucasH 2021 年 10 月 14 日
回答済み: Navya Singam 2021 年 10 月 27 日
I have a loop where an image is shown using imshow. I want that figure to be maximized. I have the following code:
figure(2);
set(2, 'WindowState', 'maximized');
figure(2), imshow([Uit1, JJJ, Uit2])
Every time the imshow-function changes the size of the figure, while the figure should remain maximized.
How can I make sure the figure stays in the right place/remains maximized?
Thanks in advance.

回答 (1 件)

Navya Singam
Navya Singam 2021 年 10 月 27 日
Hi LucasH,
The "imshow" will modify the figure size based on the image size. To change the figure position, use the "Position" property of figure.
To maximize the image use "set(hObject,'WindowState','maximized')" after "imshow".
imshow(img)
set(hObject,'WindowState','maximized')
Refer to the figure documentation for more information on figure properties.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by