I want my graph to only show the following time periods 1986, 1992, 1998, 2004, 2010, 2016, instead of the ones shown in the graph. Someone knows a solution? Thanks!
The data in .dat-file is in the format:
date value
1986-03-01 0.11
1986-06-01 0.45
...
2016-03-01 0.78
Latex code:
\usepackage{pgfplots}
\usepackage{amsthm, amsfonts, amsmath, amssymb, mathrsfs, enumerate,graphicx}
\usepackage{subcaption}
\usepgfplotslibrary{dateplot}
\usepackage{filecontents}
\pgfplotsset{height=5cm,width=8cm,compat=newest}
\usepgfplotslibrary{dateplot}
\begin{figure}[H]
\begin{subfigure}{.5\linewidth}\centering
\begin{tikzpicture}
\begin{axis}[legend style={at={(0.5,-0.35)},anchor=north},
date coordinates in=x,
x tick label style={/pgf/number format/1000 sep=},
xticklabel={\year},
ylabel=,
xlabel=Time,
enlargelimits=0.10,
legend columns=1,
]
\addplot[no markers, color=black]
table [x=date, y index=1] {msardhp.dat};
\legend{}
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\caption{}
\end{figure}

