emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] make orgtbl-ascii-plot easier to install
Date: Tue, 02 Sep 2014 23:53:19 +0200	[thread overview]
Message-ID: <54063C4F.30704@free.fr> (raw)
In-Reply-To: <87lhq7wrhg.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

Le 29/08/2014 11:54, Nicolas Goaziou a écrit :
>
> 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



[-- Attachment #2: 0001-doc-org.texi-Org-Plot-add-ascii-plot.patch --]
[-- Type: text/x-diff, Size: 2493 bytes --]

From 96155719a26614f1abed7370ddd81f7238767597 Mon Sep 17 00:00:00 2001
From: Thierry Banel <tbanelwebmin@free.fr>
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


  parent reply	other threads:[~2014-09-02 21:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 16:02 make orgtbl-ascii-plot easier to install Thierry Banel
2014-07-28 14:40 ` Bastien
2014-08-10 22:22   ` Thierry Banel
2014-08-26  8:29     ` Nicolas Goaziou
2014-08-26 19:52       ` Thierry Banel
2014-08-26 20:27         ` Nicolas Goaziou
2014-08-26 21:42           ` Thierry Banel
2014-08-26 22:09             ` Nicolas Goaziou
2014-08-26 22:21               ` Thierry Banel
2014-08-27 21:35               ` Thierry Banel
2014-08-27 23:28                 ` Nicolas Goaziou
2014-08-28 20:46                   ` Thierry Banel
2014-08-29  9:54                     ` Nicolas Goaziou
2014-08-29 17:20                       ` Thierry Banel
2014-09-02 21:53                       ` Thierry Banel [this message]
2014-09-03 18:22                         ` [PATCH] " Nicolas Goaziou
2014-09-03 20:10                           ` A key-binding for plotting Thierry Banel
2014-09-06 14:35                           ` [PATCH] remap orgtbl-ascii-plot to C-c # Thierry Banel
2014-09-08 16:30                             ` Nicolas Goaziou
2014-09-13 17:06                               ` key-binding for all plotting styles Thierry Banel
2014-10-07 14:15                                 ` Nicolas Goaziou
2014-10-07 21:40                                   ` Thierry Banel
2014-10-11 17:46                                   ` [PATCH] " Thierry Banel
2014-10-12  9:28                                     ` Nicolas Goaziou
2014-10-12 10:00                                       ` Thierry Banel
2014-10-12 14:05                                       ` Thierry Banel
2014-10-13 16:24                                         ` Nicolas Goaziou
2014-10-13 21:16                                           ` Thierry Banel
2014-10-14 20:48                                           ` Thierry Banel
2014-10-14 21:08                                             ` Nicolas Goaziou
2014-10-14 21:26                                               ` Thierry Banel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54063C4F.30704@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).