how to make figure full axes

6 ビュー (過去 30 日間)
기태
기태 2024 年 9 月 6 日
コメント済み: Adam Danz 2024 年 9 月 6 日
How to make figure full axes
The title part above keeps on expanding the figure window, but it doesn't disappear. I tried using the function called undecorateFig, but only the Matlab logo disappeared, and that part didn't disappear. If anyone knows, please let me know.
fig = figure('Units', 'pixels', 'Position', [2560 0 1920 1080], 'MenuBar', 'none', 'ToolBar', 'none', ...
'Name', '', 'NumberTitle', 'off');
ax = axes('Parent', fig, 'Units', 'pixels', 'Position', [0 0 1920 1080]);
set(ax, 'LooseInset', [0, 0, 0, 0]);
ax.OuterPosition = [0 0 1920 1080];
x = linspace(0, 10, 100);
y = sin(x);
plot(ax, x, y);
axis off

採用された回答

Voss
Voss 2024 年 9 月 6 日
編集済み: Voss 2024 年 9 月 6 日

Setting the figure's WindowState property to 'fullscreen' may achieve the desired effect, e.g.:

fig = figure('Units', 'pixels', 'Position', [2560 0 1920 1080], 'MenuBar', 'none', 'ToolBar', 'none', ...
    'Name', '', 'NumberTitle', 'off', 'WindowState', 'fullscreen');
  1 件のコメント
Adam Danz
Adam Danz 2024 年 9 月 6 日
I would also suggest using normalized axes with position set to [0 0 1 1]
ax = axes('Parent', fig, 'Units', 'normalized', 'Position', [0 0 1 1]);

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by