# How to change xticklabel or yticklabel style to Percentage?

When using tikzpicture in the pgfplots package, how can I change use PERCENTAGE for xticklabel or yticklabel.

Here is a simple example:

\documentclass[a4paper]{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Cost,
ylabel=Rate]
(2,0.003)
(3,0.004)
(4,0.005)
};
\end{axis}
\end{tikzpicture}
\end{document}


How can I change the yticklabel to percentage style: i.e. 0.3%, 0.4%, 0.5%, etc.

I checked the documentation pdfplots.pdf and pdfplotstable.pdf. There are many Number Printing Settings available but I couldn't find anything that can covert the numbers to percentage style.

Thanks to all for your help! This is what I have right now. It still has problems.

\documentclass[a4paper]{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Cost,
ylabel=Rate,
scaled ticks=false,
yticklabel=\pgfmathprintnumber{\tick}\,\%,
yticklabel style={/pgf/number format/.cd,fixed,precision=3}]
(2,0.003)
(3,0.004)
(4,0.005)
};
\end{axis}
\end{tikzpicture}
\end{document}

-
I think this is a duplicate of this one tex.stackexchange.com/questions/58566/pgfplots-in-ticks-labels Is that right? – percusse May 1 '13 at 15:36
Welcome to TeX.sx! – Peter Jansson May 1 '13 at 15:50
One more problem: The other question works well for number like 3%, 4%, 5%, etc, not for 0.3%, 0.4%, 0.5%. It just shows 3% 4% 5% and on top of the graph it has 10^(-3) – Titanic May 1 '13 at 19:29
the relevant keys are given in for example tex.stackexchange.com/questions/35909/… – percusse May 1 '13 at 22:11
Yes. I tried that before, it works well for numbers with many decimals, but it doesn't work when combined with xticklabel=\pgfmathprintnumber{\tick}\,\% I updated my post with what I have right now. – Titanic May 2 '13 at 13:51

\documentclass[a4paper]{article}
\usepackage{pgfplots}
\begin{tikzpicture}
\begin{axis}[
xlabel=Cost,
ylabel=Rate,
scaled ticks=false,
yticklabel=\pgfmathparse{100*\tick}\pgfmathprintnumber{\pgfmathresult}\,\%,
yticklabel style={/pgf/number format/.cd,fixed,precision=2}]