From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Plotting date on xaxis Date: Tue, 23 Feb 2010 09:52:56 +0000 Message-ID: <874ol8e0sn.wl%ucecesf@ucl.ac.uk> References: <417457b51002221031k48e2470aof86f6b6e71ea454b@mail.gmail.com> Reply-To: e.fraga@ucl.ac.uk Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjsAc-0006N2-50 for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 05:39:14 -0500 Received: from [140.186.70.92] (port=57208 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjsAb-0006Mj-9N for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 05:39:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NjsAa-000885-2B for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 05:39:13 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:54349) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjsAZ-00087y-PF for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 05:39:12 -0500 In-Reply-To: <417457b51002221031k48e2470aof86f6b6e71ea454b@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Johan Ekh Cc: emacs-orgmode@gnu.org On Mon, 22 Feb 2010 19:31:41 +0100, Johan Ekh wrote: > > [1.1 ] > Hi all, > I try to plot a table looking like this > > | Date | Kg | > |-----------------+--------| > | 2010-02-21 | 95.0 | > | 2010-02-22 | 93.0 | > | 2010-02-23 | 92.0 | > | 2010-02-24 | 91.5 | > | 2010-02-25 | 91.0 | > | 2010-02-29 | 92.0 | > | | | > > with the dates on the xaxis using > > #+PLOT: title:"Weight" ind:1 deps:(2) type:2d with:linespo set:"xdata time" > timefmt:%Y-%m-%d set:"yrange [90:]" > > but no plot is generated. If I remove , the plot is > generated but without interpreting the dates as dates. > > Can anyone see what I do wrong? > > Thanks in advance, > > Johan > [1.2 ] > Johan, I've played with this a bit and I also cannot get it to work. However, looking at the gnuplot comint buffer created, there is an error message that indicates that plotting xdata in time format requires a using statement to specify directly the columns to plot. I have tried, therefore, the following specification on the plot line: --8<---------------cut here---------------start------------->8--- #+PLOT: title:"Weight" ind:1 deps:(2) type:2d with:linespoints set:"xdata time" set:"timefmt '%Y-%m-%d'" set:"yrange [90:]" ind:1 deps:(2) | Date | Kg | |------------+------| | 2010-02-21 | 95.0 | | 2010-02-22 | 93.0 | | 2010-02-23 | 92.0 | | 2010-02-24 | 91.5 | | 2010-02-25 | 91.0 | | 2010-02-29 | 92.0 | --8<---------------cut here---------------end--------------->8--- I had to put quotes around the time format and also (just in case) spelled out linespoints fully. However, this still doesn't work because org-plot/gnuplot generates the following plot command: ,---- | plot '/tmp/org-plot1831zcQ' using 2:xticlabel(1) with linespoints title 'Kg' `---- Note the strange using parameters! I am not sure where this is coming from unfortunately. Note that if I type this in directly in gnuplot, with "using 1:2", everything works just fine. eric