From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: [PATCH] make orgtbl-ascii-plot easier to install Date: Tue, 02 Sep 2014 23:53:19 +0200 Message-ID: <54063C4F.30704@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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030803040105060002040008" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOw0z-0000JK-8M for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 17:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOw0v-0006nM-Qw for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 17:53:25 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]:50489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOw0v-0006mC-Ky for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 17:53:21 -0400 Received: from [IPv6:2a01:e35:2e21:def0:904:fe5:f9d5:fc64] (unknown [IPv6:2a01:e35:2e21:def0:904:fe5:f9d5:fc64]) by smtp2-g21.free.fr (Postfix) with ESMTP id B962A4B001B for ; Tue, 2 Sep 2014 23:53:19 +0200 (CEST) In-Reply-To: <87lhq7wrhg.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. --------------030803040105060002040008 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Le 29/08/2014 11:54, Nicolas Goaziou a =E9crit : > > Patch applied (with tiny changes to comments formatting, and a few > trailing whitespaces). > Here is a patch for the info doc. I added a few lines in the Org-Plot page. Regards Thierry --------------030803040105060002040008 Content-Type: text/x-diff; name="0001-doc-org.texi-Org-Plot-add-ascii-plot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-doc-org.texi-Org-Plot-add-ascii-plot.patch" >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 --------------030803040105060002040008--