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.

Hi i want to put this simbol "%" in the tick labels only in the x axis how can i do?enter image description here

share|improve this question
add comment

1 Answer

up vote 12 down vote accepted

You can use xticklabel=\pgfmathprintnumber{\tick}\,\%. xticklabel defines the code used for printing the tick labels, and \tick contains the current tick value.

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    xticklabel=\pgfmathprintnumber{\tick}\,\%
]
\addplot{rnd};
\end{axis}
\end{tikzpicture}
\end{document}
share|improve this answer
    
since the tick labels are typeset using the maths fonts, if one uses a slightly different font due to using unicode-math, it might be more appropriate to use xticklabel=\pgfmathprintnumber{\tick}\(\,\%\). –  ArTourter Jan 5 '13 at 4:39
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.