plot graph figures as binary image

4 visualizzazioni (ultimi 30 giorni)
San May
San May il 24 Dic 2020
Commentato: Zhang Qingyang il 24 Dic 2020
If I want to plot a figure and save as binary image in jpg or png file, what command should I use?

Risposte (2)

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

Zhang Qingyang
Zhang Qingyang il 24 Dic 2020
saveas
such as
saveas(gca,'Filename.jpg');
gca is the handle of you current axis

Community Treasure Hunt

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

Start Hunting!

Translated by