Dan Davison <davi...@stats.ox.ac.uk> writes: > Johan Ekh <ekh.jo...@gmail.com> 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 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode