4
\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} 

enter image description here

1
  • Interestingly, if you correct days in table of coordinates (to correct days for May, June, July and September) than instead of July will appear June.
    – Zarko
    Commented Sep 13, 2014 at 21:37

1 Answer 1

5

June only has 30 days :)

...
\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)
};
...

I also corrected the days of the month for September.

1
  • presumably the OP meant 2013-5-28,6290 to be 2013-5-31,6290?...
    – cmhughes
    Commented Sep 13, 2014 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .