为什么七月在 X 轴上打印了两次?

为什么七月在 X 轴上打印了两次?
\documentclass{article}

\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}

\begin{axis}[
date coordinates in=x,
 xtick=data,xmin=2013-01-15,xmax=2014-01-15,xlabel=\bfseries\Large x,
 xticklabel={\pgfcalendar{tickcal}{\tick}{\tick}{\pgfcalendarshorthand{m}{.}}},
 ytick={0,5000,10000,15000},
 ylabel=\bfseries\Large y,
 ymin=0,ymax=15000,
height=9cm, width=14.5cm,grid=both,minor y tick num=4]

\addplot [smooth,line width=2,red] coordinates {

(2013-1-31,13811)
(2013-2-28,10396)
(2013-3-31,11563)
(2013-4-30,10512)
(2013-5-28,6290)
(2013-6-31,5453)
(2013-7-30,5920)
(2013-8-31,7264)
(2013-9-31,7215)
(2013-10-31,10481)
(2013-11-30,14485)
(2013-12-31,14375)
};

\end{axis}
\end{tikzpicture}
\end{document} 

在此处输入图片描述

答案1

六月只有30几天:)

...
\addplot [smooth,line width=2,red] coordinates {

(2013-1-31,13811)
(2013-2-28,10396)
(2013-3-31,11563)
(2013-4-30,10512)
(2013-5-28,6290)
(2013-6-30,5453)
(2013-7-31,5920)
(2013-8-31,7264)
(2013-9-30,7215)
(2013-10-31,10481)
(2013-11-30,14485)
(2013-12-31,14375)
};
...

我还修正了九月份的日期。

相关内容