[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] graphing from org-tables

From: Carsten Dominik
Subject: Re: [Orgmode] graphing from org-tables
Date: Fri, 25 Jul 2008 09:33:24 -0700


On Jul 25, 2008, at 9:25 AM, James TD Smith wrote:

On 2008-07-25 08:53:31(-0700), Eric Schulte wrote:

Any advice for quick graphing of a table in org-mode?

I have a setup for plotting data from tables. I'm not sure if it's exactly what
you want, but yoy may find it useful.

1. Add the following to your .emacs:

(defun ahkt-plot-table (script)
 "util function to export and plot a table using the supplied
gnuplot `script'"
 (let ((cbuf (current-buffer))
        (cwin (selected-window)))
        (find-file script)
        (bury-buffer (get-buffer "*gnuplot*"))))
   (and (window-live-p cwin) (select-window cwin))
   (switch-to-buffer cbuf)

2. Create a gnuplot script which plots data from a file.

3. Add the following properties to the headline containing the table.
TABLE_EXPORT_FILE <filename in the gnuploy script>
TABLE_EXPORT_FORMAT orgtbl-to-generic :skip 4 :splice t :sep "\t"

4. Add an org link in the table (it must be in the table otherwise the export
doesn't work) as below:
[[elisp:(ahkt-plot-table "<gnuplot script>")][plot table]]

I suggest you put it at the top of the table.
You will then need to adjust the 'skip' parameter in the export format depending on the number of lines at the top of the table which should not be exported
(hlines, more than one plotting link etc).

5. You should then be able to open the link, and get a plot of the table

|-<James TD Smith>-<email/address@hidden>-|

Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]