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

11 ビュー (過去 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 件のコメント
yasmeen hadadd
yasmeen hadadd 2025 年 2 月 6 日
Thanks
Voss
Voss 2025 年 2 月 6 日
@yasmeen hadadd You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

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

カテゴリ

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

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by