I am aware that this question is quite old now... but in case there is still interest in an answer: here is one which works "on-the-fly":
\documentclass{minimal}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\pgfplotsset{compat=newest}
\begin{document}
\pgfplotsset{
custom date format/.code={
% set the normal data format:
\pgfkeysalso{date coordinates in=x}%
% query the 'x coord trafo' key's value:
\pgfkeysgetvalue{/pgfplots/x coord trafo/.@cmd}\temp
% store it (globally):
\global\let\theolddatacoordtrafo=\temp
% redefine it:
\pgfkeysdef{/pgfplots/x coord trafo}{%
% evaluate the expression:
\edef\temp{#1}%
\message{Coordinate \coordindex: Using \temp.^^J}%
% now, insert the *value* of '\temp' as argument to
% the original 'x coord trafo':
\expandafter\theolddatacoordtrafo\temp\pgfeov
}%
},
}
\begin{tikzpicture}
\begin{axis}[
custom date format={\thisrow{year}-\thisrow{month}-\thisrow{day} \thisrow{hour}:\thisrow{minute}},
% pretty-printing:
width=\linewidth,
xticklabel style={rotate=90,anchor=near xticklabel},
xticklabel=\day. \hour:\minute,
]
\addplot table[col sep=comma,y=value] {
year, month, day, hour, minute, value
2006, 5, 21, 1, 0, 10.5
2006, 5, 22, 2, 0, 23.4
2006, 5, 22, 4, 5, 30.1
2006, 5, 27, 3, 0, 35.2
};
\end{axis}
\end{tikzpicture}
\end{document}
My idea here was to define a custom 'x coord trafo', which concatenates your columns in a "proper" way and then hands the concatenated and expanded ('\edef' = expanded definition) result to the 'x coord trafo' which is used by the dateplot lib.
Consequently, the dataplot lib is unaware of the preprocessing step and the preprocessing step is performed on-the-fly.
Actually, the feature to assemble symbolic coordinates from tables is missing in pgfplots. I have taken a note on my todo list such that future versions will (eventually) support something like the 'x symbolic expr={\thisrow{year}-\thisrow{month}...}'.
create on usewith apgfplotstablesetcommand after you usepgfplotstableread. – philosodad Jan 25 '11 at 02:34pst-plot. When usingxelatexyou can create directly a pdf – Jan 25 '11 at 08:09