From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: [PATCH] key-binding for all plotting styles Date: Sun, 12 Oct 2014 16:05:14 +0200 Message-ID: <543A8A9A.4020901@free.fr> References: <53C2ADB0.2010404@free.fr> <87oaw9wg3s.fsf@bzg.ath.cx> <53E7F088.8010401@free.fr> <87tx4zhcvs.fsf@nicolasgoaziou.fr> <53FCE574.3010307@free.fr> <87vbpfnghj.fsf@nicolasgoaziou.fr> <53FCFF47.4060805@free.fr> <87r402oqce.fsf@nicolasgoaziou.fr> <53FE4F09.5080408@free.fr> <871ts1h5qv.fsf@nicolasgoaziou.fr> <53FF951B.4030300@free.fr> <87lhq7wrhg.fsf@nicolasgoaziou.fr> <54063C4F.30704@free.fr> <877g1kd0oa.fsf@nicolasgoaziou.fr> <540B1BA5.2070800@free.fr> <87sik29is3.fsf@nicolasgoaziou.fr> <541479A9.3060305@free.fr> <87k34c2cfz.fsf@nicolasgoaziou.fr> <54396D13.5070501@free.fr> <87lholprgp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020805010408090701000804" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdJlw-0000Dl-89 for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 10:05:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdJls-0002KI-1s for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 10:05:20 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:15245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdJlr-0002K0-Oz for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 10:05:15 -0400 Received: from [IPv6:2a01:e35:2e21:def0:d1e7:2c0:5cbf:dd55] (unknown [IPv6:2a01:e35:2e21:def0:d1e7:2c0:5cbf:dd55]) by smtp4-g21.free.fr (Postfix) with ESMTP id 0DC694C80CC for ; Sun, 12 Oct 2014 16:04:11 +0200 (CEST) In-Reply-To: <87lholprgp.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------020805010408090701000804 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Le 12/10/2014 11:28, Nicolas Goaziou a =E9crit : > Would you mind providing some documentation about the feature in the > manual, and updating ORG-NEWS? > > Done. To see the result: - cd to org-mode tree root - make info - launch Emacs - C-u C-h i doc/org RET - search for "Org-Plot" chapter Have fun Thierry --------------020805010408090701000804 Content-Type: text/x-diff; name="0001-Document-ascii-art-plot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Document-ascii-art-plot.patch" >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. + +@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. +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 +@subheading Ascii bar plots + +While the cursor is on a column, typing @kbd{C-c " a} or +@code{M-x 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 *}. + +@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 | +| Rochefourchat | 0.00 | | +#+TBLFM: $3='(orgtbl-ascii-draw $2 0.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 defaults to @code{12}. + +@end 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 --------------020805010408090701000804--