Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - contact me Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca on Twitter Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Lumondo Photography
Mad about you, orchestrally.Hooverphonicfeel the vibe, feel the terror, feel the pain

hitchens: beautiful


Circos at British Library Beautiful Science exhibit—Feb 20–May 26


visualization + design

Christopher Hitchens—Out of Letters

ASCII Art

The images shown here were created as part of my ASCII Art project, which extends ASCII art to include

  • proportionally spaced fonts
  • a variety of font weights in a single image
  • both tone and structure of the image to select characters
  • fixed strings to render an image in legible text

Applying the code to images of Hitchens was motivated by my own deep love of Hitchens and a typographic portrait of Christopher Hitchens, created out of Gill Sans letters by Miles Chic at Capilano University.

This adds to my growing shrines to Hitchens, including Merry Hitchmas! and hitchslap t-shirts.

Christopher Hitchens in Letters and Words

All images are generated using Gotham, with up to 8 weights (Extra Light to Ultra). Each image includes size and characters used for the image. I give the absolute type size, though only useful to know in relative terms to the size of the image and other images drawn with the same method. The color of text in each layer is the same—black— but font weight may vary.

Some images are generated using more than one layer of ASCII. In some cases the characters used in each layer are different.

basic ascii

As the font size is reduced, greater detail and contrast can be achieved.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 43pt set: . x 8 : * @ - \ | _space_ / (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 29pt set: . x 8 : * @ - \ | _space_ / (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 17pt set: . x 8 : * @ - \ | _space_ / (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: . x 8 : * @ - \ | _space_ / (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)

By setting the image with a fixed string, such as a short quote or longer body of text, detail is lost but the ASCII representation takes on more meaning.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: godisnotgreat (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 29pt set: godisnotgreat (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: Hitchslap 11 (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 5 layers (11pt -6deg, 17pt 6deg, 29pt -3deg, 43pt 3deg, 59pt 0deg) set: godisnotgreat (source from Christian Witkin/Twelve/Grand Central Publishing) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 7pt set: . x 8 : * @ - \ | _space_ / (source from Gasper Tringale) (zoom, source)

multi-layered ascii art

Images take on detail when multiple rotated layers of text is used. Each of the images below is composed of more than one layer, starting with a 2-layer image which uses the uppercase alphabet at 0 and 90 degrees.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers (0deg, 90deg) set: A-Z (source from HBO) (zoom, source)

Meaning can be added to the image by using different text in each layer. In the examples below, I set the same image using the pair "Godisnotgreat" (at 0 degrees) and "religionpoisonseverything" (at 90 degrees). In the second example, I use the unlikely combination of "Jesus" and "Mohammad"—inspired by Jesus and Mo.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: Godisnotgreat. 0deg Relionpoisonseverything. 90deg (source from HBO) (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: Jesus 0deg Mohammad 90deg (source from HBO) (zoom, source)

When rotated layers contain punctuation, very high level of detail can be achieved.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: . : - + * _space_ 0deg / 90deg (zoom, source)

The image below is made out of layers that contain only forward (/) and back (\) slashes.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: \ / (zoom, source)

The image below is made using only the period character in three layers rotated at -45, 0 and 45 degrees. Although the image looks like a pixelated version of the original—it is more than that. It is a typeset representation that uses 8 weights of Gotham. Character spacing between periods is informed by font metrics.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: . (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 2 layers set: 8 X x | ^ : . - = + ' " @ \ / | * ~ , # (source from The Australian) (zoom, source)

hitchens at the podium

The three images below show the difference between using a variety of punctuation characters and setting an image using a block of text. The first image uses "8 X x" and common punctuation.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: 8 X x | ^ : . - = + ' " @ \ / | * ~ , # (zoom, source)

I use hitchslap 9 for the first image below, and all the hitchslaps for the second image. When setting an image in using a block of text, the choice of character at any position is fixed and only the font weight is allowed to vary. When the text is relatively short (e.g. hitchslap 9 is 544 characters and is repeated 50 times in the image), rivers of space appear in the image.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: Hitchslap 9 (zoom, source)
Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: all Hitchslaps (zoom, source)

In both cases, the image is very recognizable.

recursive ascii art

When an image of text is set with the text itself, you have recursive ASCII art. Below is hitchslap 2, set with itself. In the image, the font is Gotham and the text used to asciify the image is also Gotham.

It makes ordinary moral people, compels them, forces them, in some cases orders them do disgusting wicked unforgivable things. There's no expiation for the generations of misery and suffering that religion has inflicted in this way and continues to inflict. And I still haven't heard enough apology for it. — Christopher Hitchens

The quote is 307 characters long and is repeated 391 times in the image.

Christopher Hitchens - ASCII Art / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Christopher Hitchens ASCII Art. method: Gotham font, 8 weights, 11pt set: Hitchslap 2 (source from hitchslap 2) (zoom, source)

In principle, the process of asciifying text with text can be repeated, by using the asciified image as input for asciification with progressively smaller text.

news + thoughts

Happy Pi Approximation Day— π, roughly speaking 10,000 times

Wed 23-07-2014

Celebrate Pi Approximation Day (July 22nd) with the art arm waving. This year I take the first 10,000 most accurate approximations (m/n, m=1..10,000) and look at their accuracy.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Accuracy of the first 10,000 m/n approximations of Pi. (details)

I turned to the spiral again after applying it to stack stacked ring plots of frequency distributions in Pi for the 2014 Pi Day.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Frequency distribution of digits of Pi in groups of 4 up to digit 4,988. (details)

Analysis of Variance (ANOVA) and Blocking—Accounting for Variability in Multi-factor Experiments

Mon 07-07-2014

Our 10th Points of Significance column! Continuing with our previous discussion about comparative experiments, we introduce ANOVA and blocking. Although this column appears to introduce two new concepts (ANOVA and blocking), you've seen both before, though under a different guise.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Analysis of variance (ANOVA) and blocking. (read)

If you know the t-test you've already applied analysis of variance (ANOVA), though you probably didn't realize it. In ANOVA we ask whether the variation within our samples is compatible with the variation between our samples (sample means). If the samples don't all have the same mean then we expect the latter to be larger. The ANOVA test statistic (F) assigns significance to the ratio of these two quantities. When we only have two-samples and apply the t-test, t2 = F.

ANOVA naturally incorporates and partitions sources of variation—the effects of variables on the system are determined based on the amount of variation they contribute to the total variation in the data. If this contribution is large, we say that the variation can be "explained" by the variable and infer an effect.

We discuss how data collection can be organized using a randomized complete block design to account for sources of uncertainty in the experiment. This process is called blocking because we are blocking the variation from a known source of uncertainty from interfering with our measurements. You've already seen blocking in the paired t-test example, in which the subject (or experimental unit) was the block.

We've worked hard to bring you 20 pages of statistics primers (though it feels more like 200!). The column is taking a month off in August, as we shrink our error bars.

Krzywinski, M. & Altman, N. (2014) Points of Significance: Analysis of Variance (ANOVA) and Blocking Nature Methods 11:699-700.

Background reading

Krzywinski, M. & Altman, N. (2014) Points of Significance: Designing Comparative Experiments Nature Methods 11:597-598.

Krzywinski, M. & Altman, N. (2014) Points of Significance: Comparing Samples — Part I — t-tests Nature Methods 11:215-216.

Krzywinski, M. & Altman, N. (2013) Points of Significance: Significance, P values and t-tests Nature Methods 10:1041-1042.

...more about the Points of Significance column

Designing Experiments—Coping with Biological and Experimental Variation

Thu 29-05-2014

This month, Points of Significance begins a series of articles about experimental design. We start by returning to the two-sample and paired t-tests for a discussion of biological and experimental variability.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Designing Comparative Experiments. (read)

We introduce the concept of blocking using the paired t-test as an example and show how biological and experimental variability can be related using the correlation coefficient, ρ, and how its value imapacts the relative performance of the paired and two-sample t-tests.

We also emphasize that when reporting data analyzed with the paired t-test, differences in sample means (and their associated 95% CI error bars) should be shown—not the original samples—because the correlation in the samples (and its benefits) cannot be gleaned directly from the sample data.

Krzywinski, M. & Altman, N. (2014) Points of Significance: Designing Comparative Experiments Nature Methods 11:597-598.

Background reading

Krzywinski, M. & Altman, N. (2014) Points of Significance: Comparing Samples — Part I — t-tests Nature Methods 11:215-216.

Krzywinski, M. & Altman, N. (2013) Points of Significance: Significance, P values and t-tests Nature Methods 10:1041-1042.

Have skew, will test

Wed 28-05-2014

Our May Points of Significance Nature Methods column jumps straight into dealing with skewed data with Non Parametric Tests.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Non Parametric Testing. (read)

We introduce non-parametric tests and simulate data scenarios to compare their performance to the t-test. You might be surprised—the t-test is extraordinarily robust to distribution shape, as we've discussed before. When data is highly skewed, non-parametric tests perform better and with higher power. However, if sample sizes are small they are limited to a small number of possible P values, of which none may be less than 0.05!

Krzywinski, M. & Altman, N. (2014) Points of Significance: Non Parametric Testing Nature Methods 11:467-468.

Background reading

Krzywinski, M. & Altman, N. (2014) Points of Significance: Comparing Samples — Part I — t-tests Nature Methods 11:215-216.

Krzywinski, M. & Altman, N. (2013) Points of Significance: Significance, P values and t-tests Nature Methods 10:1041-1042.