I would like to restrict the domain of the x axis while using date coordinates. However, the following example (modified from pgfplots manual) will not compile since the domain boundaries for the third plot are not provided as floating point numbers:
\documentclass[11pt,a4paper]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{dateplot}
\begin{document}
\begin{tikzpicture}
\pgfplotstableread{
date account1 account2 account3
2008-01-03 60 1200 400
2008-02-06 120 1600 410
2008-03-15 -10 1600 410
2008-04-01 1800 500 410
2008-05-20 2300 500 410
2008-06-15 800 1920 410
}\myTable
\begin{axis}[
date coordinates in=x,
xticklabel={\day.\month.},
xlabel={2008},
yticklabel={\pgfmathprintnumber{\tick} EUR},
ylabel=Total credit,
ylabel style={yshift=10pt}]
\addplot table[x=date,y=account1] {\myTable};
\addplot table[x=date,y=account2] {\myTable};
\addplot table[x=date,y=account3,restrict x to domain={2008-01-03}:{2008-03-15}] {\myTable};
\end{axis}
\end{tikzpicture}
\end{document}
Do you have an idea on how to still achieve the desired effect of restricting the domain? I would like to avoid interfering with the data provided in the table.
P.S.:
This question differs from Specify a domain when using date coordinates? which is on using soft clip
. Using curly brackets for the domain boundaries as proposed therein does not work here.