From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Plotting (with gnuplot) using dates timestamps Date: Mon, 26 Mar 2012 19:02:18 +0200 Message-ID: References: <1332770878.2404.3.camel@ascraeus> <27136.1332772632@alphaville> <020AB818-EA26-43CC-B8F9-CCFD714972E1@polytechnique.org> <2012-03-26T17-46-02@devnull.Karl-Voit.at> Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCDJI-000081-KX for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 13:02:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCDJC-0001tF-AS for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 13:02:24 -0400 Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:20576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCDJC-0001st-4S for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 13:02:18 -0400 In-Reply-To: <2012-03-26T17-46-02@devnull.Karl-Voit.at> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: news1142@Karl-Voit.at Cc: emacs-orgmode@gnu.org On 26 mars 2012, at 17:48, Karl Voit wrote: > * Alan Schmitt wrote: >>=20 >> Thanks a lot for all the suggestions. The part I was missing was the = preprocessing from babel. Using simply >>=20 >> set xdata time >> set timefmt "%Y-%m-%d" >>=20 >> did the trick. >=20 > I just wanted to check this out but I am not able to produce the > plot :-( I just get the coordinate system but with an empty plane > (no points). >=20 > Can you please post the while working example (or correct my error)? Change this > set timefmt "[%Y-%m-%d %a]" to this set timefmt "%Y-%m-%d" I also don't specify the range. > set xrange ["[2011-08-01 foo]":"[2012-04-01 bar]"] Here is the full version. #+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 | #+begin_src gnuplot :var data=3Ddata-table reset set title "Consommation =C9lectrique" set size ratio square set xlabel "Date" set xdata time set timefmt "%Y-%m-%d" set format x "%Y-%m" set xtics nomirror set ylabel "HP" set ytics nomirror set y2label "HC" set y2tics nomirror set style data points plot data using 1:2 with linespoints axis x1y1 title 'HP', \ data using 1:3 with linespoints axis x1y2 title 'HC' #+end_src Alan=