I would like to set the last xticklabel to \infty. How can this be achieved without necessarily knowing the xtick value?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xticklabel={\tick >= 24 ? $\infty$ : $\pgfmathprintnumber{\tick}$}
]
\addplot+[] table {\somedata};
\end{axis}
\end{tikzpicture}
\end{document}
(note: the above inline conditional doesn't work at all, it's just to illustrate what I am trying to do)


\documentclassand the appropriate packages so that those trying to help don't have to recreate it. This would also ensure that the proposed solution actually works for your case. – Peter Grill Feb 14 '12 at 18:37