From 96155719a26614f1abed7370ddd81f7238767597 Mon Sep 17 00:00:00 2001 From: Thierry Banel Date: Tue, 2 Sep 2014 23:41:41 +0200 Subject: [PATCH] * doc/org.texi (Org-Plot): add ascii plot --- doc/org.texi | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index fafa93b..d0e1476 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3258,8 +3258,13 @@ functions. @cindex plot tables using Gnuplot @cindex #+PLOT -Org-Plot can produce 2D and 3D graphs of information stored in org tables -using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode} +Org-Plot can produce graphs of information stored in org tables, either +graphically or in ascii-art. + +@subheading Graphical plots using @file{Gnuplot} + +Org-Plot produces 2D and 3D graphs using @file{Gnuplot} +@uref{http://www.gnuplot.info/} and @file{gnuplot-mode} @uref{http://xafs.org/BruceRavel/GnuplotMode}. To see this in action, ensure that you have both Gnuplot and Gnuplot mode installed on your system, then call @code{org-plot/gnuplot} on the following table. @@ -3337,6 +3342,42 @@ may still want to specify the plot type, as that can impact the content of the data file. @end table +@subheading Ascii bar plots + +While the cursor is on a column, typing @kbd{C-c p} create a new column +containing an ascii-art bars plot. The plot is implemented through a regular +column formula. When the source column changes, the bar plot may be updated +by refreshing the table, for example typing @kbd{C-u C-c *}. + +@example +@group +| Sede | Max cites | | +|-----------+-----------+--------------| +| Chile | 257.72 | WWWWWWWWWWWW | +| Leeds | 165.77 | WWWWWWWh | +| Sao Paolo | 71.00 | WWW; | +| Stockholm | 134.19 | WWWWWW: | +| Morelia | 257.56 | WWWWWWWWWWWH | +#+TBLFM: $3='(orgtbl-ascii-draw $2 0 257.72 12) +@end group +@end example + +The formula is an elisp call: +@lisp +(orgtbl-ascii-draw COLUMN MIN MAX WIDTH) +@end lisp + +@table @code +@item COLUMN + is a reference to the source column. +@item MIN MAX + are the minimal and maximal values displayed. Sources values + outside this range are displayed as @code{too small} + or @code{too large}. +@item WIDTH + is the width in characters of the bar-plot. It default to @code{12}. +@end table + @node Hyperlinks @chapter Hyperlinks @cindex hyperlinks -- 1.9.1