Problem in saving figure

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 Comments

Sorry, you do or you do not want the white part with the numbers and ticks?
Yeah, I do not want the white part.

Sign in to comment.

 Accepted Answer

Mischa Kim
Mischa Kim on 11 Feb 2014

0 votes

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

5 Comments

I need to do that with code.
Mischa Kim
Mischa Kim on 11 Feb 2014
Edited: Mischa Kim on 11 Feb 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.
Thanks man! I got it.
Just use the export command you have been using:
hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
Okay thanks

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics in Help Center and File Exchange

Asked:

on 11 Feb 2014

Commented:

on 11 Feb 2014

Community Treasure Hunt

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

Start Hunting!