TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the MWE below:





ylabel={Time Elapsed (in hours)},
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
bar width=7pt,
symbolic x coords={Category-1,Category-2},

        coordinates {(Category-1,0.27) (Category-2,14.96)};

        coordinates {(Category-1,0.37) (Category-2,13.25)};

        coordinates {(Category-1,2.76)  (Category-2,29.55)};

        coordinates {(Category-1,2.82) (Category-2,16.03)};

        \legend{Original, byHalf, Random, Hybrid}


How can I make the two parts (Category-1 and Category-2) come closer to each other ?

share|improve this question
Try enlarge x limits=1 – Jake Aug 29 '12 at 13:31
Works great @Jake thanks! if you can put this in an answer I will be happy to accept it ;) – Cemre Aug 29 '12 at 13:36
up vote 2 down vote accepted

You can increase the space on either side of the plot by setting enlarge x limits=<value>. Setting enlarge x limits=1 works quite well in this case.

share|improve this answer

Your Answer


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.