答案1
添加xticklabel style={rotate=90}
到axis
选项中。例如:
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xticklabel style={rotate=90},
date coordinates in=x,
xticklabel={\day.\month.\year}
]
\addplot coordinates{(2015-01-05,42)(2015-06-20,24)};
\end{axis}
\end{tikzpicture}
\end{document}