pgfplots: cambia la etiqueta x en el medio del diagrama

pgfplots: cambia la etiqueta x en el medio del diagrama

¿Qué tengo que configurar para obtener la etiqueta x exactamente en el medio del diagrama?

ingrese la descripción de la imagen aquí

\documentclass[]{book}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[font=\footnotesize]
\begin{axis}[
xlabel={This is the x-label},
xlabel style={fill=yellow,
at={([shift={(xticklabel* cs:0.5)}]yticklabel* cs:0.5)},
},
]
\end{axis}
\end{tikzpicture}
\end{document}

Respuesta1

Definiendo xlabel style(correctamente) la posición de la etiqueta:

\begin{document}
    \begin{tikzpicture}[font=\footnotesize]
\begin{axis}[
xlabel={This is the x-label},
xlabel style={fill=yellow,
               at={(0.5,0.5)}, anchor=center}, % <---
]
\end{axis}
    \end{tikzpicture}
\end{document}

ingrese la descripción de la imagen aquí

información relacionada