Is it possible to tell pgfplots
to put tick labels between the tick marks instead of at the tick marks?
MWE:
\documentclass[margin=5pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=5in,
height=3in,
axis lines=middle,
scaled ticks=false,
xtick=\empty,
xmin=0,
xmax=3,
extra x ticks={0,1,2,3},
extra x tick labels={low,high,med},
]
\addplot [mark=*,draw] coordinates {(0.5,2) (1.5,4) (2.5,3)};
\end{axis}
\end{tikzpicture}
\end{document}
Result:
I can do it manually by adding
xticklabel style = {xshift=1.9cm,align=center},
but this seems unsatisfying, unreliable, and requires too much trial and error.
extra x ticks={0.5,1.5,2.5},
?