From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Plotting date on xaxis Date: Tue, 23 Feb 2010 10:33:10 -0700 Message-ID: <87d3zvq2ll.fsf@gmail.com> References: <417457b51002221031k48e2470aof86f6b6e71ea454b@mail.gmail.com> <87zl30c6zn.fsf@gmail.com> <417457b51002230827w555d345dg98fbbea5c0091a36@mail.gmail.com> <87vddnzxdr.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjydO-00020P-Nv for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 12:33:22 -0500 Received: from [140.186.70.92] (port=45597 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjydN-00020H-Sh for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 12:33:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NjydM-0002U3-RE for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 12:33:21 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:61952) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjydM-0002Tn-MX for emacs-orgmode@gnu.org; Tue, 23 Feb 2010 12:33:20 -0500 Received: by fxm22 with SMTP id 22so4090582fxm.26 for ; Tue, 23 Feb 2010 09:33:15 -0800 (PST) In-Reply-To: <87vddnzxdr.fsf@stats.ox.ac.uk> (Dan Davison's message of "Tue, 23 Feb 2010 12:15:44 -0500") 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: Dan Davison Cc: emacs-orgmode@gnu.org Dan Davison writes: > Johan Ekh writes: > >> Thanks guys, >> the babel version worked perfect so I didn't try the other one thanks! >> Would it be possible to use python and matplotlib with babel instead of >> gnuplot? >> If so, could you just indicate how such a src code block would look like? > > Hi Johan, > > I've never used matplotlib, but here's a start. Firstly, one thing I > notice is that org-babel-python currently doesn't like the column names > on the table (I'll add it to our TODO list). So if we make a table like > this, without the header: > One nice way to get around headers is through indexing into variable references, so for example the following two are equivalent... #+results: my-table | 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-26 | 92.0 | #+begin_src python :var data=my-table[2:-1] :results output print str(data) #+end_src #+results: my-table-nohdr | 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-26 | 92.0 | #+begin_src python :var data=my-table-nohdr :results output print str(data) #+end_src Best -- Eric