# Cropped pdf file after export

I have plot generated by Plot[] function that I want to export to pdf file. The problem is that Export[] function somehow cuts a tiny bit of plot on the left side which results in something like this:

I'd like to know what should I do to get exported file without cropped $0$.

-
It's always best if you provide an example of the code you used. But even without that, I would suggest manually setting the Plot option ImagePadding -> 70 (or use a larger number). –  Jens Jun 22 '12 at 17:20
@Jens thanks, that works good. –  qoqosz Jun 22 '12 at 17:25

Here is my original suggestion using ImagePadding:

p = Plot[Cos[x], {x, 0, 2}, AxesStyle -> Arrowheads[.1],
PlotRange -> {0, 1}, TicksStyle -> Large, RotateLabel -> False,


And here is an example of how to use ImageMargins in the plot command:

p = Plot[Cos[x], {x, 0, 2}, AxesStyle -> Arrowheads[.1],
PlotRange -> {0, 1}, TicksStyle -> Large, RotateLabel -> False,
ImageMargins -> 70]


Both methods work to give you extra space around the image. But I see Mr. Wizard just now explained this already.

Edit: a note for completeness

In a related question, one can see that neither ImagePadding nor ImageMargins work in some situations. Here is an example where Epilog is used to place a text below a plot:

Plot[Sin[x], {x, 0, 2 Pi},
Epilog -> {Text["Show me the text", {Pi, -1.3}]}]


The text is not shown because it falls outside the PlotRange. When this happens, you can fix the problem by using PlotRangePadding:

Plot[Sin[x], {x, 0, 2 Pi},
Epilog -> {Text["Show me the text", {Pi, -1.3}]},


-
I reduced my answer to this after realizing I was confusing ImagePadding and ImageMargins. –  Mr.Wizard Jun 22 '12 at 17:32
@Mr.Wizard Now you confuse me because I was editing while you were too... Hopefully all the bases are covered now. –  Jens Jun 22 '12 at 17:34
Jens, sorry, if I had been thinking clearly about ImageMargins/ImagPadding from the start I would have not have had to make a series of edits. –  Mr.Wizard Jun 22 '12 at 17:39
That's OK - you got my +1. –  Jens Jun 22 '12 at 17:40

Plot[2 Sin[x] + x, {x, 0, 15}, Filling -> Bottom, ImageMargins -> 10]

ImageMargins gives a margin around the existing plot that can be seen by selecting the graphic (the outer orange frame):
By comparison ImagePadding is used by Plot itself to make room for the axes labels (the inner orange frame).
Thanks, but proposed ImagePadding option works good and is sufficient for my needs. –  qoqosz Jun 22 '12 at 17:27
@qoqosz actually I didn't see that comment above, and also I was confusing ImageMargins with ImagePadding; you can use ImageMargins directly in Plot and that would be a good method because you can use a small fixed value without cutting of the labels, as you would with ImagePadding. –  Mr.Wizard Jun 22 '12 at 17:30