On 26 mars 2012, at 16:37, Nick Dokos wrote: > Steven Buczkowski <steven.buczkow...@gmail.com> wrote: > >> On Mon, 2012-03-26 at 15:37 +0200, Alan Schmitt wrote: >>> Hello, >>> >>> I'm trying to plot the following table, but the dates part is all wrong. Is >>> there a way to tell gnuplot what the date format is? >>> >>> #+tblname: data-table >>> | Date | HP | HC | >>> |------------------+--------+--------| >>> | [2011-08-20 Sat] | 006815 | 008399 | >>> | [2011-08-29 Mon] | 006840 | 008438 | >>> | [2011-09-11 Sun] | 006946 | 008552 | >>> | [2011-12-11 Sun] | 007805 | 009603 | >>> | [2012-03-04 Sun] | 008800 | 010826 | >>> | [2012-03-11 Sun] | 008876 | 010930 | >>> | [2012-03-25 Sun] | 009015 | 011121 | >>> >> >> In straight gnuplot, I would do something like the following: >> >> gnuplot> set xdata time >> gnuplot> set timefmt '[%Y-%m-%d %a]' >> > > The "set xdata time" line is indeed what makes the difference: > without it, gnuplot doesn't know that this is a time series. > But there are some additional details: when babel prepares the > data, the data file that will be fed to gnuplot ends up like this > (not sure this is documented though): > > ,---- > | 2011-08-20-00:00:00 6815 8399 > | 2011-08-29-00:00:00 6840 8438 > | 2011-09-11-00:00:00 6946 8552 > | 2011-12-11-00:00:00 7805 9603 > | 2012-03-04-00:00:00 8800 10826 > | 2012-03-11-00:00:00 8876 10930 > | 2012-03-25-00:00:00 9015 11121 > `----
Thanks a lot for all the suggestions. The part I was missing was the preprocessing from babel. Using simply set xdata time set timefmt "%Y-%m-%d" did the trick. And yes: the gnuplot built-in help seems very complete. Thanks again, Alan