[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] text-only plots
From: |
Michael Brand |
Subject: |
Re: [O] text-only plots |
Date: |
Sun, 8 Dec 2013 12:27:21 +0100 |
Hi Thierry
On Sat, Dec 7, 2013 at 8:48 PM, Thierry Banel <address@hidden> 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
unicode.png
Description: PNG image
- [O] text-only plots, Thierry Banel, 2013/12/07
- Re: [O] text-only plots, Suvayu Ali, 2013/12/08
- Re: [O] text-only plots,
Michael Brand <=
- Re: [O] text-only plots, Michael Brand, 2013/12/08
- Re: [O] text-only plots, Thierry Banel, 2013/12/08
- Re: [O] text-only plots, Thierry Banel, 2013/12/08
- Re: [O] text-only plots, Carsten Dominik, 2013/12/08
- Re: [O] text-only plots, Thierry Banel, 2013/12/08
- Re: [O] text-only plots, Suvayu Ali, 2013/12/09
- Re: [O] text-only plots, Ivan Andrus, 2013/12/09
- Re: [O] text-only plots, Thierry Banel, 2013/12/09
- Re: [O] text-only plots, Suvayu Ali, 2013/12/09
- Re: [O] text-only plots, Thierry Banel, 2013/12/10