how to make figure full axes

6 visualizaciones (últimos 30 días)
기태
기태 el 6 de Sept. de 2024
Comentada: Adam Danz el 6 de Sept. de 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

Respuesta aceptada

Voss
Voss el 6 de Sept. de 2024
Editada: Voss el 6 de Sept. de 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 comentario
Adam Danz
Adam Danz el 6 de Sept. de 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]);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by