The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How do I crop EPS output?
Replies: 4   Last Post: Apr 7, 2004 7:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Stefan Stoll

Posts: 189
Registered: 12/7/04
Re: How do I crop EPS output?
Posted: Apr 6, 2004 12:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.

Matlab's eps output is far from perfect. I usually
hack the eps files to remove things I don't want, like
the background rectangle.

Matlab adds a white filled rectangle as figure back-
ground object to the eps file. You can see that when
you import the eps file into a vector graphics program
and ungroup the imported object. In the eps file,
the line responsible is

0 0 <x> <y> rf

<x> and <y> are numbers that depend on the PaperPosition
property of the figure. rf produces the filled rectangle.

Comment this line out if you want to get rid of the figure
background rectangle. Using set(gcf,'Color','none') doesn't
work, contrary to my exspectation.

The upcoming Matlab 7.0 will have new axis properties to
help better control bounding boxes, see


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.