hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
By using above function I am saving figure which is shown below:
But I want to save it as shown below: (with outer white portion of image)
How can I do so?

2 commentaires

Walter Roberson
Walter Roberson le 11 Fév 2014
Sorry, you do or you do not want the white part with the numbers and ticks?
Explorer
Explorer le 11 Fév 2014
Yeah, I do not want the white part.

Connectez-vous pour commenter.

 Réponse acceptée

Mischa Kim
Mischa Kim le 11 Fév 2014

0 votes

This answer illustrates the how-to well. Simply clip the figure based on its size.

5 commentaires

Explorer
Explorer le 11 Fév 2014
I need to do that with code.
Mischa Kim
Mischa Kim le 11 Fév 2014
Modifié(e) : Mischa Kim le 11 Fév 2014
Yep, the code is shown in the answer I referred you to. The only other thing you need, in addition, would probably be
set(gca,'XTick',[],'YTick',[])
to remove the axis ticks.
Explorer
Explorer le 11 Fév 2014
Thanks man! I got it.
Mischa Kim
Mischa Kim le 11 Fév 2014
Just use the export command you have been using:
hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
Explorer
Explorer le 11 Fév 2014
Okay thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by