9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] toy: pseudo-sparklines
@ 2011-05-17  4:25 Anthony Sorace
  2011-05-17  7:37 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Sorace @ 2011-05-17  4:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-17  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17  4:25 [9fans] toy: pseudo-sparklines Anthony Sorace
2011-05-17  7:37 ` erik quanstrom

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).