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.

In pgfplots I've used the text width option in the definition of xticklabel style and I wonder how to center the labels text?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You can use the key align=center in addition to text width.

share|improve this answer
    
Hi Martin! I'd tried that before but got the following error: Package pgfkeys Error: I do not know the key '/tikz/align' and I am going to ignore it. Perhaps you misspelled it. –  MaKa TaBo May 17 '11 at 18:09
1  
@Matthias: That means you're using an old version of TikZ. If you're using the version of TeXLive shipped with Ubuntu, you should switch to the direct installation from the TeXLive website, as the Ubuntu version is hopelessly outdated. If you're using a different install, try updating the PGF/TikZ package. –  Jake May 17 '11 at 18:20
1  
Thanks for that remark! I didnt realize that there was a new version of tikZ. Now align=center works –  MaKa TaBo May 17 '11 at 20:38
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.