>From 916f974ed4597e3d03124089d6ce90ccd3d235cf Mon Sep 17 00:00:00 2001 From: Thierry Banel Date: Sun, 12 Oct 2014 15:23:12 +0200 Subject: [PATCH] Document ascii art plot * doc/org.texi: Extend Gnuplot chapter to ascii art plotting. * etc/ORG-NEWS: Document ascii art plot. --- doc/org.texi | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++----- etc/ORG-NEWS | 2 ++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index ad872a8..91fa211 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3258,11 +3258,16 @@ 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. + address@hidden Graphical plots using @file{Gnuplot} + +Org-Plot produces 2D and 3D graphs using @file{Gnuplot} address@hidden://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. +call @kbd{C-c " g} or @code{M-x org-plot/gnuplot RET} on the following table. @example @group @@ -3280,8 +3285,8 @@ call @code{org-plot/gnuplot} on the following table. Notice that Org Plot is smart enough to apply the table's headers as labels. Further control over the labels, type, content, and appearance of plots can be exercised through the @code{#+PLOT:} lines preceding a table. See below -for a complete list of Org-plot options. For more information and examples -see the Org-plot tutorial at +for a complete list of Org-plot options. The @code{#+PLOT:} lines are +optional. For more information and examples see the Org-plot tutorial at @uref{http://orgmode.org/worg/org-tutorials/org-plot.html}. @subsubheading Plot Options @@ -3337,6 +3342,47 @@ may still want to specify the plot type, as that can impact the content of the data file. @end table address@hidden Ascii bar plots + +While the cursor is on a column, typing @kbd{C-c " a} or address@hidden orgtbl-ascii-plot RET} 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 *}. + address@hidden address@hidden +| Sede | Max cites | | +|---------------+-----------+--------------| +| Chile | 257.72 | WWWWWWWWWWWW | +| Leeds | 165.77 | WWWWWWWh | +| Sao Paolo | 71.00 | WWW; | +| Stockholm | 134.19 | WWWWWW: | +| Morelia | 257.56 | WWWWWWWWWWWH | +| Rochefourchat | 0.00 | | +#+TBLFM: $3='(orgtbl-ascii-draw $2 0.0 257.72 12) address@hidden group address@hidden example + +The formula is an elisp call: address@hidden +(orgtbl-ascii-draw COLUMN MIN MAX WIDTH) address@hidden lisp + address@hidden @code address@hidden COLUMN + is a reference to the source column. + address@hidden MIN MAX + are the minimal and maximal values displayed. Sources values + outside this range are displayed as @code{too small} + or @code{too large}. + address@hidden WIDTH + is the width in characters of the bar-plot. It defaults to @code{12}. + address@hidden table + @node Hyperlinks @chapter Hyperlinks @cindex hyperlinks diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 0a5af68..a29eec6 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -96,6 +96,8 @@ would throw an error. A new variable ~org-table-formula-create-columns~ was added to adjust this behavior. It is now possible to silently add new columns, to do so with a warning or to explicitly ask the user each time. +*** Ascii plot +Ability to plot values in a column through ascii-art bars. ** Miscellaneous *** File names in links accept are now compatible with URI syntax Absolute file names can now start with =///= in addition to =/=. E.g., -- 1.9.1