From: Michael Brand <michael.ch.brand@gmail.com>
To: Thierry Banel <tbanelwebmin@free.fr>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: text-only plots
Date: Sun, 8 Dec 2013 12:27:21 +0100 [thread overview]
Message-ID: <CALn3zoid_PU5yyB0ht63CNO2qFLG1up0Xv1pEkecxZ6hpnmjUg@mail.gmail.com> (raw)
In-Reply-To: <loom.20131207T195235-422@post.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
Hi Thierry
On Sat, Dec 7, 2013 at 8:48 PM, Thierry Banel <tbanelwebmin@free.fr> wrote:
> What about text-only plots in tables ?
> All in Emacs, without any external package.
>
> | x | x^2 | |
> |----+-----+--------------|
> | 0 | 0 | |
> | 1 | 1 | . |
> | 2 | 4 | : |
> | 3 | 9 | u |
> | 4 | 16 | W |
> | 5 | 25 | Wu |
> | 6 | 36 | WW: |
> | 7 | 49 | WWH |
> | 8 | 64 | WWWV |
> | 9 | 81 | WWWWH |
> | 10 | 100 | WWWWWW |
> | 11 | 121 | WWWWWWW- |
> | 12 | 144 | WWWWWWWWl |
> | 13 | 169 | WWWWWWWWWW. |
> | 14 | 196 | WWWWWWWWWWWV |
> #+TBLFM: $3='(orgtbl-ascii-draw $2 0 200)
>
> I wrote a package to draw such small-quick-and-text-only graphs.
> It is here: http://orgmode.org/worg/org-contrib/orgtbl-ascii-plot.html
> Just type C-c p
>
> Comments and enhancements are welcome!
> Have fun.
Your idea is very good. I suggest to have also a unicode variant using
http://en.wikipedia.org/wiki/Block_Elements
with (elt " ▏▎▍▌▋▊▉" [...]) to divide one char into eight widths which
I will use often for time series:
| year | % | ascii | unicode |
|------+----+----------+----------|
| 2009 | 55 | WWWWWWl | ▉▉▉▉▉▉▌ |
| 2010 | 54 | WWWWWWu | ▉▉▉▉▉▉▍ |
| 2011 | 60 | WWWWWWW: | ▉▉▉▉▉▉▉▏ |
| 2012 | 62 | WWWWWWW; | ▉▉▉▉▉▉▉▍ |
#+TBLFM: $3 = '(orgtbl-ascii-draw $2 0 100) :: $4 = '(orgtbl-uc-draw $2 0 100)
Attached is a screenshot with DejaVu Sans Mono as an example of a font
that shows the same block height for all block widths (some other
fonts don't show the same block height for all block widths). Remember
"C-u C-x =" too see the name etc. of the char at point.
Michael
[-- Attachment #2: unicode.png --]
[-- Type: image/png, Size: 11488 bytes --]
next prev parent reply other threads:[~2013-12-08 11:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 19:48 text-only plots Thierry Banel
2013-12-08 11:00 ` Suvayu Ali
2013-12-08 11:27 ` Michael Brand [this message]
2013-12-08 12:28 ` Michael Brand
2013-12-08 12:58 ` Thierry Banel
2013-12-08 17:43 ` Thierry Banel
2013-12-08 19:48 ` Carsten Dominik
2013-12-08 23:10 ` Thierry Banel
2013-12-09 12:19 ` Suvayu Ali
2013-12-09 14:30 ` Ivan Andrus
2013-12-09 22:48 ` Thierry Banel
2013-12-09 23:55 ` Suvayu Ali
2013-12-10 22:24 ` Thierry Banel
2013-12-08 22:16 ` Michael Brand
2013-12-08 23:15 ` Thierry Banel
2013-12-08 13:34 ` Achim Gratz
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=CALn3zoid_PU5yyB0ht63CNO2qFLG1up0Xv1pEkecxZ6hpnmjUg@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tbanelwebmin@free.fr \
/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).