9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Anthony Sorace <a@9srv.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] toy: pseudo-sparklines
Date: Tue, 17 May 2011 00:25:44 -0400	[thread overview]
Message-ID: <8D4049D0-5A78-4277-A0D1-9B70B32BC941@9srv.net> (raw)

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

Edward Tufte's sparklines[0] are a wonderful way of
representing a wide variety of data in word-like spaces. You
can't use them in text-only places, though, leading some
folks to come up (very rough) approximations using unicode
characters[1]. They're a poor shadow of the real thing, but
can still be useful for some types of data and some contexts.

Roughly inspired by a writeup of some guy's python
implementation[2] of a generator, I threw one together this
afternoon in rc and hoc: [3]

	:; sparkline 0 2 4 7 12 16 3 11 9 0 4 
	▁▂▃▄▇█▂▆▅▁▃:; 

The internet has noted that in some contexts the baseline gets
messed up, but they're still a fun toy.

Also, thanks to lmnop in #plan9 for this:

	fn moustache { sparkline `{seq 0 1 10} `{seq 9 -1 0} ; echo }

Maybe a tribute to our go friends[3].

a

[0]	http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1
[1]	http://kottke.org/11/05/twitter-sparklines
[2]	http://www.leancrew.com/all-this/2011/05/textexpander-sparkline-snippet/
[3]	/n/sources/contrib/anothy/bin/rc/sparkline
[4]	http://moustach-io.appspot.com/


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 210 bytes --]

             reply	other threads:[~2011-05-17  4:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17  4:25 Anthony Sorace [this message]
2011-05-17  7:37 ` erik quanstrom

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

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

  git send-email \
    --in-reply-to=8D4049D0-5A78-4277-A0D1-9B70B32BC941@9srv.net \
    --to=a@9srv.net \
    --cc=9fans@9fans.net \
    /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.
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 NNTP newsgroup(s).