How to get rid of the margin in an *.eps file?

hello:

I have created a TCanvas and draw a graph in it. Then save the canvas as a eps form:
can->SaveAs(“test.eps”);
while i apply the test.eps in LATEX. The top margin appears.
See the attached file.
such as you want to insert a AA pattern, you need to insert the margin too:

AA
how could i avoid this rebarbative margin?
thank you!

Hi

Did you try those options ?
gStyle->SetFillColor(0);
gStyle->SetPadBorderSize(0);

Where is the attached file ? I do not see it …

yes,
i have tried it and the white margin still exist.

This is not an EPS file. This is a PS file. It doesn’t contain the %%BoundingBox. That’s why you see margins when you include it in Latex. Generate an EPS file and it will work.