![如何将日期轴旋转90度?](https://linux22.com/image/334844/%E5%A6%82%E4%BD%95%E5%B0%86%E6%97%A5%E6%9C%9F%E8%BD%B4%E6%97%8B%E8%BD%AC90%E5%BA%A6%EF%BC%9F.png)
答案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}