how to make figure full axes

6 Ansichten (letzte 30 Tage)
기태
기태 am 6 Sep. 2024
Kommentiert: Adam Danz am 6 Sep. 2024
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

Akzeptierte Antwort

Voss
Voss am 6 Sep. 2024
Bearbeitet: Voss am 6 Sep. 2024

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 Kommentar
Adam Danz
Adam Danz am 6 Sep. 2024
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]);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by