[Tex/LaTex] PGFPlots % in ticks labels

pgfplots

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

Best Answer

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}