plot graph figures as binary image

If I want to plot a figure and save as binary image in jpg or png file, what command should I use?

回答 (2 件)

Image Analyst
Image Analyst 2020 年 12 月 24 日

1 投票

The preferred way for R2020a and later is:
exportgraphics(gcf, 'MyFigure.png'); % Or can use gca for the axis (not the whole figure);

1 件のコメント

Zhang Qingyang
Zhang Qingyang 2020 年 12 月 24 日
Obviously you are more professional!

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

Zhang Qingyang
Zhang Qingyang 2020 年 12 月 24 日

0 投票

saveas
such as
saveas(gca,'Filename.jpg');
gca is the handle of you current axis

質問済み:

2020 年 12 月 24 日

コメント済み:

2020 年 12 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by