plot graph figures as binary image

2 vues (au cours des 30 derniers jours)
San May
San May le 24 Déc 2020
Commenté : Zhang Qingyang le 24 Déc 2020
If I want to plot a figure and save as binary image in jpg or png file, what command should I use?

Réponses (2)

Image Analyst
Image Analyst le 24 Déc 2020
The preferred way for R2020a and later is:
exportgraphics(gcf, 'MyFigure.png'); % Or can use gca for the axis (not the whole figure);
  1 commentaire
Zhang Qingyang
Zhang Qingyang le 24 Déc 2020
Obviously you are more professional!

Connectez-vous pour commenter.


Zhang Qingyang
Zhang Qingyang le 24 Déc 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