[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Plotting date on xaxis
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Plotting date on xaxis |
Date: |
Tue, 23 Feb 2010 10:33:10 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
Dan Davison <address@hidden> writes:
> Johan Ekh <address@hidden> 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
- [Orgmode] Plotting date on xaxis, Johan Ekh, 2010/02/22
- Re: [Orgmode] Plotting date on xaxis, Eric S Fraga, 2010/02/23
- Re: [Orgmode] Plotting date on xaxis, Eric Schulte, 2010/02/23
- Re: [Orgmode] Plotting date on xaxis, Eric S Fraga, 2010/02/23
- Re: [Orgmode] Plotting date on xaxis, Eric Schulte, 2010/02/23
- Re: [Orgmode] Plotting date on xaxis, Eric S Fraga, 2010/02/24
- Re: [Orgmode] Plotting date on xaxis, Eric Schulte, 2010/02/25
- Re: [Orgmode] Plotting date on xaxis, Eric S Fraga, 2010/02/25
- [Orgmode] Re: Plotting date on xaxis, Johan Ekh, 2010/02/26