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.

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

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
up vote 16 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
1  
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

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.