# Why is tikz ignoring the set ytick values?

I have a plot with y-axis values that are rounded to two decimals by tikz. The change in the values occurs in the 3rd and 4th decimal. Because of the rounding constant values are shown on the y-axis:

The MWE is shown below. I've tried setting the ytick property to include the desired values, but this didn't solve the problem.

\documentclass{book}

\usepackage{amsmath}
\usepackage{tikz}                   % needed to import .tikz graphics
\usepackage{pgfplots}               % needed to import .tikz graphics

\begin{document}
Text and image:

\begin{tikzpicture}

\begin{axis}[%
width=0.8\textwidth,
height=0.3\textheight,
scale only axis,
xmin=4000,
xmax=5000,
xtick={4000, 4200, 4400, 4600, 4800, 5000},
xlabel={iteration},
xmajorgrids,
ymin=0.4615,
ymax=0.4645,
ytick={0.4615, 0.4625, 0.4635, 0.4645},
ylabel={$\text{C}_\text{L}\text{ [-]}$},
ymajorgrids,
axis x line*=bottom,
axis y line*=left
]
table[row sep=crcr]{
3997    0.463684    \\
};
\end{axis}
\end{tikzpicture}%

\end{document}


How can I force tikz to display the exact y-axis values as set in the ytick property?

Using number format/precision you can change the default value of 2. Here's an example of change in precision for the y-axis labels from the default 2 to 3:

\documentclass{book}

\usepackage{amsmath}
\usepackage{tikz}                   % needed to import .tikz graphics
\usepackage{pgfplots}               % needed to import .tikz graphics

\begin{document}
Text and image:

\begin{tikzpicture}

\begin{axis}[%
width=0.8\textwidth,
height=0.3\textheight,
scale only axis,
xmin=4000,
xmax=5000,
xtick={4000, 4200, 4400, 4600, 4800, 5000},
xlabel={iteration},
xmajorgrids,
ymin=0.4615,
ymax=0.4645,
ytick={0.4615, 0.4625, 0.4635, 0.4645},
ylabel={$\text{C}_\text{L}\text{ [-]}$},
yticklabel style={/pgf/number format/precision=3},
ymajorgrids,
axis x line*=bottom,
axis y line*=left
]