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

조회 수: 1 (최근 30일)
yasmeen hadadd
yasmeen hadadd 2025년 2월 5일
댓글: Voss 2025년 2월 6일
how to save an app.uiaxes as .png with axis off and without title ?
but without change the property in gui at showing

답변 (1개)

Voss
Voss 2025년 2월 5일
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
Voss
Voss 2025년 2월 6일
@yasmeen hadadd You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by