From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Plotting (with gnuplot) using dates timestamps Date: Mon, 26 Mar 2012 17:48:13 +0200 Message-ID: <2012-03-26T17-46-02@devnull.Karl-Voit.at> References: <1332770878.2404.3.camel@ascraeus> <27136.1332772632@alphaville> <020AB818-EA26-43CC-B8F9-CCFD714972E1@polytechnique.org> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCCA1-0001Ek-B7 for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 11:48:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCC9v-0003wl-0K for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 11:48:44 -0400 Received: from plane.gmane.org ([80.91.229.3]:56267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCC9u-0003wQ-PO for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 11:48:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SCC9k-00007X-90 for emacs-orgmode@gnu.org; Mon, 26 Mar 2012 17:48:28 +0200 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Mar 2012 17:48:28 +0200 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Mar 2012 17:48:28 +0200 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: emacs-orgmode@gnu.org * Alan Schmitt wrote: > > 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. 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). Can you please post the while working example (or correct my error)? Thanks! #+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=data-table reset set title "Consommation Électrique" set size ratio square set xlabel "Date" set xdata time set timefmt "[%Y-%m-%d %a]" set xrange ["[2011-08-01 foo]":"[2012-04-01 bar]"] set yrange [6800:9100] set ylabel "HP" set ytics nomirror set y2range [8000:12000] set y2label "HC" set y2tics nomirror set style data points plot data using 1:2 axis x1y1 title 'HP', \ data using 1:3 axis x1y2 title 'HC' #+end_src -- Karl Voit Hallo, mein Name ist Web 2.0. Gib mir dein Adressbuch und lass mich Emails lesen