Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to delete empty space around graph automatically.my external picture is below graph without green box. I want delete this empty space green box automatically not by using xmax and xmin. enter image description here

share|improve this question
add comment

1 Answer

You want option enlargelimits = false, which turns off the automatic enlargement of the range.


The standard setting of enlargelimits is true, which will automatically enlarges adds a percentage on to the highest/lowest values for both x- and y-axes. I'm afraid I don't know what percentage gets added, but I think it's around 10%. So for example if the maximum x value in the input was 10, the x-axis upper limit would be 11. The over all result is to produce a 'border' around the material.

Setting enlargelimits = false means that pgfplots sets the limits to the maximum/minimum values in the input. So in my example, the plot would stop at exactly 10.

Other options are to have one limit automatic (settings upper and lower), or to do things on an axis by axis basis (for example using `enlarge x limits). This is covered in the pgfplots manual, page 216.

share|improve this answer
    
can you more explain for me? –  sayros May 4 '12 at 7:41
    
tanks for your ansewer –  sayros May 4 '12 at 8:09
    
@sayros: The best way to thank people for their contribution is to upvote helpful answers (by clicking the upward-pointing triangle next to the answer) and marking the answer that actually solves your problem by clicking the tick mark next to it. This will give the answerer (and you) some reputation, and helps others to quickly find good answers. –  Jake May 6 '12 at 23:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.