How to place y ticks' labels inside the bars?
Add axis on top
to avoid bars overprinting labels.
Then we want
y tick label style={anchor=west,color=white,xshift=\pgfkeysvalueof{/pgfplots/major tick length}},
to:
- anchor at the west of the label,
- colored white so the text shows over black, and
- shifted one tick width to the right, since presumably you did not want to change the position of the tick marks themselves.
We also need bar shift=0pt
to center the labels vertically in the bars.
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
%axis lines={left, },% xtick=\empty
%axis lines={left, right},
%legend style={draw=none},
%
%/pgfplots/axis y line*=box|left|middle|center|right|none 219
%giving up on removing top and right lines%%%
compat=newest,
axis on top,
title=Gears Rxf,
xbar, xmin=0,
bar width= 1.0cm,
width=12cm, height=5cm, enlarge y limits=0.5,
xlabel={Points},
%==========
y=2.5cm,
symbolic y coords={Special,Normal},
ytick={Special, Normal},
y tick label style={anchor=west,color=white,xshift= \pgfkeysvalueof{/pgfplots/major tick length}},
bar shift=0pt,
%yticklabel style={inner ysep=0pt, anchor=south east},
nodes near coords, nodes near coords align={horizontal},
]
\addplot[color=gray,fill] coordinates {(2.31,Normal)};
\addplot[color=black,fill] coordinates {(2.58,Special)};
\end{axis}
\end{tikzpicture}
\end{document}