From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: [PATCH] key-binding for all plotting styles Date: Tue, 14 Oct 2014 22:48:06 +0200 Message-ID: <543D8C06.1030700@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> <543A8A9A.4020901@free.fr> <87mw90ndjc.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050605010200030107030301" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe90u-0006xj-QL for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 16:48:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xe90q-0002Nc-FZ for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 16:48:12 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:34739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe90q-0002NU-6i for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 16:48:08 -0400 Received: from [IPv6:2a01:e35:2e21:def0:a8eb:56f6:f89a:fa92] (unknown [IPv6:2a01:e35:2e21:def0:a8eb:56f6:f89a:fa92]) by smtp3-g21.free.fr (Postfix) with ESMTP id D30E6A62B2 for ; Tue, 14 Oct 2014 22:46:57 +0200 (CEST) In-Reply-To: <87mw90ndjc.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. --------------050605010200030107030301 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Here is the updated patch. 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 Regards Thierry Le 13/10/2014 18:24, Nicolas Goaziou a =E9crit : > > Some comments follow. > ... > > It should be > > @kbd{M-x org-plot/gnuplot @key{RET}} > @kbd{M-x orgtbl-ascii-plot @key{RET}} > @samp{too small} or @samp{too large}. > @samp{12} Fixed > Note there is also the macro > > @orgcmd{C-c " g,org-plot/gnuplot} This macro is used as bullet items in a @table I cannot use it in the middle of a text. > BTW is-it ASCII-art or ascii-art? Changed to capitals. --------------050605010200030107030301 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 5168483137640a896501c88740052fe5112bed54 Mon Sep 17 00:00:00 2001 From: Thierry Banel Date: Tue, 14 Oct 2014 22:34:54 +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 | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- etc/ORG-NEWS | 2 ++ 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 05df0eb..767fa1a 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3258,11 +3258,17 @@ 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 @kbd{M-x org-plot/gnuplot @key{RET}} on the following +table. @example @group @@ -3280,8 +3286,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 +3343,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 +@kbd{M-x orgtbl-ascii-plot @key{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 @samp{too small} + or @samp{too large}. + +@item WIDTH + is the width in characters of the bar-plot. It defaults to @samp{12}. + +@end table + @node Hyperlinks @chapter Hyperlinks @cindex hyperlinks diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 0a5af68..e94dec6 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 --------------050605010200030107030301--