emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-plot (generating graphs from org-mode)
@ 2008-08-26  1:53 Eric Schulte
  2008-08-26 10:02 ` Manish
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Eric Schulte @ 2008-08-26  1:53 UTC (permalink / raw)
  To: Org-mode

Hi,

org-plot enables generation of graphs from data stored in org tables
(maybe eventually elsewhere in org files).

It is available on github at
http://github.com/eschulte/org-plot/tree/master or with

  git clone git://github.com/eschulte/org-plot.git

Included with org-plot.el is an example.org file which should quickly
show off it's features, options and abilities.

While this is not completed, it is functional, and I figure better to
get early feedback then wait until it's all polished.  Please give it
a look and let me know what you think.

Thanks -- Eric

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
@ 2008-08-26 10:02 ` Manish
  2008-08-26 15:10   ` Eric Schulte
  2008-08-26 12:24 ` Sebastian Rose
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Manish @ 2008-08-26 10:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

  On Tue, Aug 26, 2008 at 7:23 AM, Eric Schulte wrote:
  > Hi,
  >
  > org-plot enables generation of graphs from data stored in org tables
  > (maybe eventually elsewhere in org files).
  >
  > It is available on github at
  > http://github.com/eschulte/org-plot/tree/master or with
  >
  >  git clone git://github.com/eschulte/org-plot.git
  >
  > Included with org-plot.el is an example.org file which should quickly
  > show off it's features, options and abilities.
  >
  > While this is not completed, it is functional, and I figure better to
  > get early feedback then wait until it's all polished.  Please give it
  > a look and let me know what you think.

Awesome!  This has wonderful possibilities for my work.  I just wish I
had this a couple of months ago.  But I hope I am going to have an
opportunity to use this again soon.

Works great on GNU Emacs 22.1.1 with Org 6.06b and gnuplot 4.2
patchlevel 3.  Got a "current buffer has no process" when tried from
Windows Native GNU Emacs 22.2.1 but I am sure that's something I need
to correct at my end.

A couple of questions (or feature requests):

1. How can I save the image?  I think the question how to use a
   different device like "png" and have charts saved on disk.

2. How to use custom labels?

3. How can I pick and choose which columns to plot like in gnuplot's
   plot command?

4. How can I cycle through all tables and plot them all?

Thanks for writing and sharing this.

Regards,
-- Manish

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
  2008-08-26 10:02 ` Manish
@ 2008-08-26 12:24 ` Sebastian Rose
  2008-08-26 12:36 ` Sebastian Rose
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Sebastian Rose @ 2008-08-26 12:24 UTC (permalink / raw)
  Cc: Org-mode

Hi Eric,

It's beautiful!

...but in emacs 23 only the first table works.

C-M-g on the other tables gives me the following message:

'Not in table data field'


emacs 23, CVS last week, Debian testing.


But, hey, this is wonderful!


  - Sebastian


Eric Schulte wrote:
> Hi,
> 
> org-plot enables generation of graphs from data stored in org tables
> (maybe eventually elsewhere in org files).
> 
> It is available on github at
> http://github.com/eschulte/org-plot/tree/master or with
> 
>   git clone git://github.com/eschulte/org-plot.git
> 
> Included with org-plot.el is an example.org file which should quickly
> show off it's features, options and abilities.
> 
> While this is not completed, it is functional, and I figure better to
> get early feedback then wait until it's all polished.  Please give it
> a look and let me know what you think.
> 
> Thanks -- Eric
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
  2008-08-26 10:02 ` Manish
  2008-08-26 12:24 ` Sebastian Rose
@ 2008-08-26 12:36 ` Sebastian Rose
  2008-08-26 15:08   ` Eric Schulte
  2008-08-27 15:27 ` Samuel Wales
  2008-09-02 18:08 ` Thomas Baumann
  4 siblings, 1 reply; 14+ messages in thread
From: Sebastian Rose @ 2008-08-26 12:36 UTC (permalink / raw)
  Cc: Org-mode

Hi again,


still emacs 23:


On the table with data:

   The first try works. Then I have to pres C-M-g twice to get
   the plot window.


On the empty tables:

   with (setq debug-on-error t) this is in *Messages*:


(:plot-type grid :with lines :ind 0 :title "org mode" :map nil) [3 times]
Mark set [14 times]
Mapping tables: 100%
Mark set [2 times]
Mapping tables: done
signal: Wrong number of arguments: (lambda (el) (message (format "%S" 
el)) el), 2



The buffer is modified after C-M-g and emacs asks if I want to save it.


  - Sebastian

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26 12:36 ` Sebastian Rose
@ 2008-08-26 15:08   ` Eric Schulte
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Schulte @ 2008-08-26 15:08 UTC (permalink / raw)
  To: sebastian_rose; +Cc: Org-mode

On Tuesday, August 26, at 14:36, Sebastian Rose wrote:
 > Hi again,
 > 
 > 
 > still emacs 23:

on Debian (Xubuntu) I'm using
- cvs emacs23 (from a couple of weeks ago)
- gnuplot 4.2 patchlevel 2
- gnuplot.el 0.6.0

 > On the table with data:
 > 
 >    The first try works. Then I have to pres C-M-g twice to get
 >    the plot window.

I've noticed this as well, but for me it only happens when doing 3d or
grid plots.  I think the gnuplot process may be changing state, I may
just start restarting this process before every graph.

 > On the empty tables:
 > 
 >    with (setq debug-on-error t) this is in *Messages*:

How have I never seen `debug-on-error' before! thanks

 > (:plot-type grid :with lines :ind 0 :title "org mode" :map nil) [3 times]
 > Mark set [14 times]
 > Mapping tables: 100%
 > Mark set [2 times]
 > Mapping tables: done
 > signal: Wrong number of arguments: (lambda (el) (message (format "%S" 
 > el)) el), 2
 > 
 > 
 > 
 > The buffer is modified after C-M-g and emacs asks if I want to save it.

That is certainly something to figure out.

I've added all these issues to my TODO for the project, and will
hopefully start resolving them soon, I'll update here.

Thanks for the testing/debugging -- Eric

 >   - Sebastian
 > 
 > 
 > 
 > 
 > _______________________________________________
 > Emacs-orgmode mailing list
 > Remember: use `Reply All' to send replies to the list.
 > Emacs-orgmode@gnu.org
 > http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
schulte

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26 10:02 ` Manish
@ 2008-08-26 15:10   ` Eric Schulte
  2008-09-01 14:27     ` Carsten Dominik
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2008-08-26 15:10 UTC (permalink / raw)
  To: Manish; +Cc: Org-mode

On Tuesday, August 26, at 15:32, Manish wrote:
 >   On Tue, Aug 26, 2008 at 7:23 AM, Eric Schulte wrote:
 >   > Hi,
 >   >
 >   > org-plot enables generation of graphs from data stored in org tables
 >   > (maybe eventually elsewhere in org files).
 >   >
 >   > It is available on github at
 >   > http://github.com/eschulte/org-plot/tree/master or with
 >   >
 >   >  git clone git://github.com/eschulte/org-plot.git
 >   >
 >   > Included with org-plot.el is an example.org file which should quickly
 >   > show off it's features, options and abilities.
 >   >
 >   > While this is not completed, it is functional, and I figure better to
 >   > get early feedback then wait until it's all polished.  Please give it
 >   > a look and let me know what you think.
 > 
 > Awesome!  This has wonderful possibilities for my work.  I just wish I
 > had this a couple of months ago.  But I hope I am going to have an
 > opportunity to use this again soon.

Great to hear, hopefully this will be more robust by then :)

 > Works great on GNU Emacs 22.1.1 with Org 6.06b and gnuplot 4.2
 > patchlevel 3.  Got a "current buffer has no process" when tried from
 > Windows Native GNU Emacs 22.2.1 but I am sure that's something I need
 > to correct at my end.

I'll take a look and see if there are any unix-only commands being
used, I have no access to windows machines so I may not be able to
reproduce.

 > A couple of questions (or feature requests):
 > 
 > 1. How can I save the image?  I think the question how to use a
 >    different device like "png" and have charts saved on disk.

you can save the image by adding a

 file:"path-to-image.jpg"

option to the #+PLOT: line above the graph, which should set gnuplot's
`output' and `term' options appropriately, if you want to do fancy
things you can set these values manually by adding something like the
following to the #+PLOT: line

 set:"terminal png transparent nocrop enhanced font arial 8"
 set:"output 'my-output-file.png'"

 > 2. How to use custom labels?

there is an option intended for this purpose labels:(col1 col2) which
should have this effect, however I will probably need to change the
way the regexp parses options first, I'll put this on my TODO list and
let you know when it's working.

 > 3. How can I pick and choose which columns to plot like in gnuplot's
 >    plot command?

you select the column to serve as the dependent variable (x-axis)
using the dep: command with the number of the column as the sole
argument (dep:1 to use the first column).  To specify which cols
should be plotted use the inds: options passing a list of column
numbers, like inds:(2 3)

 > 4. How can I cycle through all tables and plot them all?

I have no idea what the best method would be for cycling through
tables, I agree this would be a useful feature (picturing all graphs
being re-generated upon export to latex/html), however I don't know of
any commands for cycling through tables.  I've been thinking of
defining a [[plot:]] type link which may make this easier.  Also, I
may be able to copy an answer from the exporting code.  If anyone has
any ideas I'd love to hear them.

 > Thanks for writing and sharing this.

Thank you, I'm happy it may be useful. -- Eric

 > Regards,
 > -- Manish

-- 
schulte

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
                   ` (2 preceding siblings ...)
  2008-08-26 12:36 ` Sebastian Rose
@ 2008-08-27 15:27 ` Samuel Wales
  2008-08-27 22:18   ` Eric Schulte
  2008-09-02 18:08 ` Thomas Baumann
  4 siblings, 1 reply; 14+ messages in thread
From: Samuel Wales @ 2008-08-27 15:27 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

Good stuff.

Possibilities:

1.  For a selected column, it can be nice to draw a histogram.  Long
ago, I developed the following formula for choosing a bin size.  Seems
to work.

        5*(max-min)/n

You can use something like bin*round*($1 * (1.0/bin)) to bin.  Note
that cl-extra.el's (round*) might be more consistent and
mathematically vetted than (round) (though you might not be allowed to
use cl-extra.el).

I haven't looked at gnuplot in a decade, so maybe it already has this.

2.  It might be nice to show descriptive statistics (I would show
mean, median, geometric mean, standard deviation, min, max, range)
somewhere while showing the plot, if you don't already do this.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-27 15:27 ` Samuel Wales
@ 2008-08-27 22:18   ` Eric Schulte
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Schulte @ 2008-08-27 22:18 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org-mode

On Wednesday, August 27, at 08:27, Samuel Wales wrote:
 > Good stuff.
 > 
 > Possibilities:
 > 
 > 1.  For a selected column, it can be nice to draw a histogram.  

There is a 'with histograms' option in gnuplot.  I made a small change
to org-plot.el so that this option now works as expected, for an
example of plotting a histogram (of one or more columns) using
org-plot see the example.org file in my git repo.

 > 2.  It might be nice to show descriptive statistics (I would show
 > mean, median, geometric mean, standard deviation, min, max, range)
 > somewhere while showing the plot, if you don't already do this.

That does seem like it would be useful (maybe accessible through
another optional argument), I've added it to the project's TODO file.

Thanks -- Eric

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26 15:10   ` Eric Schulte
@ 2008-09-01 14:27     ` Carsten Dominik
  0 siblings, 0 replies; 14+ messages in thread
From: Carsten Dominik @ 2008-09-01 14:27 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

Hi Eric, you have done an awesome job.  I am very excited to try this  
out.

- Carsten

On Aug 26, 2008, at 5:10 PM, Eric Schulte wrote:
>> 4. How can I cycle through all tables and plot them all?
>
> I have no idea what the best method would be for cycling through
> tables, I agree this would be a useful feature (picturing all graphs
> being re-generated upon export to latex/html), however I don't know of
> any commands for cycling through tables.  I've been thinking of
> defining a [[plot:]] type link which may make this easier.  Also, I
> may be able to copy an answer from the exporting code.  If anyone has
> any ideas I'd love to hear them.


To call a function at each table, you can use org-table-map-tables,  
defined in org.el.

- Carsten

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: org-plot (generating graphs from org-mode)
  2008-09-01 19:45           ` Seweryn Kokot
@ 2008-09-01 20:17             ` Eric Schulte
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Schulte @ 2008-09-01 20:17 UTC (permalink / raw)
  To: Seweryn Kokot; +Cc: emacs-orgmode

oh, not at all,

I was using it for convenience during my own debugging, and didn't
realize I was overwriting an existing function.  Please feel free to
remove the `debug' definition from org-plot.el (I will remove it from
the version in my git repo right now).

Thanks -- Eric

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: org-plot (generating graphs from org-mode)
  2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
                   ` (3 preceding siblings ...)
  2008-08-27 15:27 ` Samuel Wales
@ 2008-09-02 18:08 ` Thomas Baumann
  2008-09-02 21:26   ` JBash
  4 siblings, 1 reply; 14+ messages in thread
From: Thomas Baumann @ 2008-09-02 18:08 UTC (permalink / raw)
  To: emacs-orgmode

Awesome, thanks.

Thomas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: org-plot (generating graphs from org-mode)
  2008-09-02 18:08 ` Thomas Baumann
@ 2008-09-02 21:26   ` JBash
  2008-09-03  7:03     ` Carsten Dominik
  0 siblings, 1 reply; 14+ messages in thread
From: JBash @ 2008-09-02 21:26 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1151 bytes --]

In trying the example, I'm getting a message saying a function definition
(org-table-to-lisp) is void.
I've been using org-mode for a few months, but I'm not at all familiar with
lisp.
I just today pulled the files (org-plot.el and example.org) from
http://github.com/eschulte/org-plot/tree/master.
Can someone help?

Thanks,
Jerry

Using emacs 22.2.1; gnuplot 4.2 patchlevel 2; debian lenny

OVERVIEW
CHILDREN
Loading
/home/jlb/dl1/eschulte-org-plot-e30c71abadada20558d11610943c3d8f42fc4258/org-plot.el
(source)...done
(progn (add-to-list 'load-path "./") (load "org-plot.el")) => t
(local-set-key "\M-\C-g" 'org-plot/gnuplot) => org-plot/gnuplot
Loading /home/jlb/emacs/org-mode/lisp/org-table.el (source)...done
let*: Symbol's function definition is void: org-table-to-lisp [8 times]
call-interactively: End of buffer


On Tue, Sep 2, 2008 at 2:08 PM, Thomas Baumann <dtbaumann@yahoo.de> wrote:

> Awesome, thanks.
>
> Thomas
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 1878 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: org-plot (generating graphs from org-mode)
  2008-09-02 21:26   ` JBash
@ 2008-09-03  7:03     ` Carsten Dominik
  2008-09-03 14:26       ` Eric Schulte
  0 siblings, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2008-09-03  7:03 UTC (permalink / raw)
  To: JBash; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1531 bytes --]


On Sep 2, 2008, at 11:26 PM, JBash wrote:

> In trying the example, I'm getting a message saying a function  
> definition (org-table-to-lisp) is void.
> I've been using org-mode for a few months, but I'm not at all  
> familiar with lisp.
> I just today pulled the files (org-plot.el and example.org) from http://github.com/eschulte/org-plot/tree/master 
> .
> Can someone help?


org-plot.el needs to do (require 'org-table)

- Carsten

>
>
> Thanks,
> Jerry
>
> Using emacs 22.2.1; gnuplot 4.2 patchlevel 2; debian lenny
>
> OVERVIEW
> CHILDREN
> Loading /home/jlb/dl1/eschulte-org-plot- 
> e30c71abadada20558d11610943c3d8f42fc4258/org-plot.el (source)...done
> (progn (add-to-list 'load-path "./") (load "org-plot.el")) => t
> (local-set-key "\M-\C-g" 'org-plot/gnuplot) => org-plot/gnuplot
> Loading /home/jlb/emacs/org-mode/lisp/org-table.el (source)...done
> let*: Symbol's function definition is void: org-table-to-lisp [8  
> times]
> call-interactively: End of buffer
>
>
> On Tue, Sep 2, 2008 at 2:08 PM, Thomas Baumann <dtbaumann@yahoo.de>  
> wrote:
> Awesome, thanks.
>
> Thomas
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 2590 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: org-plot (generating graphs from org-mode)
  2008-09-03  7:03     ` Carsten Dominik
@ 2008-09-03 14:26       ` Eric Schulte
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Schulte @ 2008-09-03 14:26 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

>
> org-plot.el needs to do (require 'org-table)
>

Thanks, I applied this change to the git repo

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-09-03 14:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26  1:53 org-plot (generating graphs from org-mode) Eric Schulte
2008-08-26 10:02 ` Manish
2008-08-26 15:10   ` Eric Schulte
2008-09-01 14:27     ` Carsten Dominik
2008-08-26 12:24 ` Sebastian Rose
2008-08-26 12:36 ` Sebastian Rose
2008-08-26 15:08   ` Eric Schulte
2008-08-27 15:27 ` Samuel Wales
2008-08-27 22:18   ` Eric Schulte
2008-09-02 18:08 ` Thomas Baumann
2008-09-02 21:26   ` JBash
2008-09-03  7:03     ` Carsten Dominik
2008-09-03 14:26       ` Eric Schulte
     [not found] <20080826151404.0996C2179B@mailhost.cs.tu-berlin.de>
2008-08-26 17:57 ` Emacs-orgmode Digest, Vol 30, Issue 39 Stephan Schmitt
2008-08-26 18:08   ` Eric Schulte
2008-08-26 23:09     ` org-plot (generating graphs from org-mode) Eric Schulte
2008-08-29 11:16       ` William Henney
2008-09-01  0:52         ` Eric Schulte
2008-09-01 19:45           ` Seweryn Kokot
2008-09-01 20:17             ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).