how to save an app.uiaxes as .png with axis off and without title ?

1 visualización (últimos 30 días)
yasmeen hadadd
yasmeen hadadd el 5 de Feb. de 2025
Comentada: Voss el 6 de Feb. de 2025
how to save an app.uiaxes as .png with axis off and without title ?
but without change the property in gui at showing

Respuestas (1)

Voss
Voss el 5 de Feb. de 2025
filename = 'output.png';
ax = app.UIAxes;
ax_vis = strcmp(ax.Visible,'on');
if ax_vis
ax.Visible = 'off';
end
exportgraphics(ax,filename)
if ax_vis
ax.Visible = 'on';
end
  4 comentarios
Voss
Voss el 6 de Feb. de 2025
@yasmeen hadadd You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

Iniciar sesión para comentar.

Categorías

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

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by