Date: Apr 7, 2004 7:44 AM
Author: Jens Benecke
Subject: Re: How do I crop EPS output? -- SOLUTION

Stefan Stoll wrote:

> Jens Benecke wrote

>> However, when I use manual size (wfactor, hfactor above) Matlab adds a
>> white margin to the document at the left and right side. I would like to
>> remove those margins because I need the plots to align with the text in
>> the documents.

> What exactly do you want to align with your text?
> The y axis label, the tick descriptors, the ticks,
> the y axis? Please give some more details.


thanks for your reply! I want the figure to be exactly as big as the file
geometry, so that when I tell LaTeX to input the picture with
"width=\textwidth" it will be exactly as wide as the text.

Currently, the graphics have a large white margin left and right
(, instead of being
"cropped" (, though the latter
is not _perfectly_ cropped, it would be enough for me).

But I just found
"epstool" ( which can
do exactly what I need:

epstool --copy --bbox input.eps output.eps

will "optimize" the BoundingBox of the EPS file and remove any margins.

Thank you, anyway :-)

Jens Benecke (jens at - Europaweite kostenlose Mitfahrzentrale - 100% saubere Postfächer - garantiert! - PHP ab 9? - SSH ab 19? - günstiger Traffic
Please DO NOT CC: me, I read the lists and newsgroups I post in!