Manual error for xticklabel pos
Brought to you by:
cfeuersaenger,
ludewich
There seems to be a small discrepancy in the manual. For xticklabel pos it reads
/pgfplots/xticklabel pos=left|right|default (initially default) /pgfplots/yticklabel pos=left|right|default (initially default) /pgfplots/zticklabel pos=left|right|default (initially default) /pgfplots/ticklabel pos=left|right|default (initially default)Allows to choose where to place tick labels. The choices left and right place tick labels either at the left or at the right side of the complete axis. The choice default uses the same setting as
xtick pos(orytick pos). This option is only useful for boxed axes – keep it to default for non-boxed figures. Theticklabel posstyle sets all three of them to the same value.For x, the additional choices
bottomandtopcan be used which are equivalent toleftandright, respectively. Both are accepted for x.
However, compiling this code:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis x line=middle,
xticklabel pos=top,
]
\addplot[samples=2] {x};
\end{axis}
\end{tikzpicture}
\end{document}
throws the error
! Package pgfplots Error: Sorry, the key 'xticklabel pos' does not know what to
do with 'top'... accepted values are 'default, 'lower', 'upper' and some
aliases. Maybe you misspelled it?.
The error is pretty clear about what is allowed, but it is not the same as given in the manual.
Thanks for bringing this to my attention!
I have added support for "xticklabel pos=bottom|top".