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 Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Hilbertonians - Creatures on the Hilbert Curve
Thoughts rearrange, familiar now strange.Holly Golightly & The Greenhornes break flowers

pi day: beautiful


Visualization Tour, Melbourne, October 9–20, 2014


visualization + design

Typography geek? If you like the geometry and mathematics of these posters, you may enjoy something more lettered. Visions of type: Type Peep Show: The Private Curves of Letters posters.

← art(π,φ,e)

2013 Pi Day Art Posters — March 14

download

numbers.tgz
1,000,000 digits of π, φ, e and ASN.

watch video

Watch the video at Numberphile about my art.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Numberphile video — Pi is Beautiful. (watch)

2014 Pi Day art

Explore Pi Day art for 2014.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Pi Day art for 2014. (explore)

buy artwork

All the artwork can be purchased from Fine Art America.

buy Pi day posters

buy Love in Pi posters

transcend, don't repeat, yourself

Proclus got it right when he said (as quoted by M. Kline in Mathematical Thought from Ancient to Modern Times)

Wherever there is number, there is beauty.

So let's explore what Pi looks like with something whimsical and pretty and colourful. Rational art of the highly irrational, a regime where beauty runs with her hair down and lets her "ribbons to flow confusedly." Robert Herrick says it well in Sweet Disorder,

I see a wild civility;—
Do more bewitch me, than when art
Is too precise in every part.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Each digit is represented by a dot of a different color. The inner grey dots appear to glimmer—this is the luminance effect in action.

The posters explore the relationship between adjacent digits in Pi, which are encoded by color using the scheme shown above. The design appears to shimmer due to the luminance effect. In some versions of the poster, adjacent identical (or similar) digits are connected by lines.

Want more math + art? Discover the Accidental Similarity Number and other number art. Find humor in my poster of the first 2,000 4s of Pi.

The recipe for each poster is included and gives the color of the ith outer/inner circle. π[i] is used to represent the ith digit of π. For example, the recipe

π[i] / π[i+1]

generates a poster whose outer circle color encodes the ith digit and the inner circle color encodes the next digit (i+1). In this scheme, inner and outer circles of adjacent positions have the same color.

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

source and methods

The posters were generated automatically with a Perl script that generated SVG files. Post processing and layout was done in Illustrator. If you are interested in depicting your favourite number this way, let me know.

The design was inspired by the beautiful AIDS posters by Elena Miska.

love in Pi—you can find it here

I calculated Pi to 13,099,586 digits and then I found love.

It's fun to look for words in Pi. I wanted to know the first time that love appears in Pi. When encoded using the scheme a=0, b=1, ..., z=25, love is the digit 1114214. This digit appears first at position 13,099,586 (...892199163111142148187311392...). And, of course, infinitely many times after that.

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)
Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)
Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

If you use the scheme a=1, b=2, ..., z=26, then love becomes 1215225. This is first seen at 6,317,696 (...610311912912152256606850141...).

Because the digits of Pi never repeat and are distributed randomly (as far as we know), if you look long enough you'll find all the words in Pi infinitely many times.

700 digits (20 x 35)

π[i] / grey, 80% opacity

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1], 80% opacity

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

2,800 (40 x 70) digits

π[i] / grey, 80% opacity (equal neighbours connected)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1], 80% opacity (equal neighbours connected)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

— / π[i+1] (equal neighbours connected, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1] (equal neighbours connected with line width proportional to difference in neighbour digits d∈{0,1,2}, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1] (equal neighbours connected with line width proportional to difference in neighbour digits d∈{0..5}, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

Pi (π): — / red (equal neighbours connected, unconnected digits not shown)
Phi (φ): — / white (equal neighbours connected, unconnected digits not shown)
e: — / grey (equal neighbours connected, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

11,400 (80 x 140) digits

π[i] / grey, 80% opacity (equal neighbours connected)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1], 80% opacity (equal neighbours connected)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1] &>

π[i] / grey, 80% opacity (equal neighbours connected, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

π[i] / π[i+1], 80% opacity (equal neighbours connected, unconnected digits not shown)

Pi Day Art Poster / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Pi Day Art Poster | March 14th is Pi Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)

news + thoughts

Nested Designs—Assessing Sources of Noise

Mon 29-09-2014

Sources of noise in experiments can be mitigated and assessed by nested designs. This kind of experimental design naturally models replication, which was the topic of last month's column.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Nested designs. (read)

Nested designs are appropriate when we want to use the data derived from experimental subjects to make general statements about populations. In this case, the subjects are random factors in the experiment, in contrast to fixed factors, such as we've seen previously.

In ANOVA analysis, random factors provide information about the amount of noise contributed by each factor. This is different from inferences made about fixed factors, which typically deal with a change in mean. Using the F-test, we can determine whether each layer of replication (e.g. animal, tissue, cell) contributes additional variation to the overall measurement.

Krzywinski, M., Altman, N. & Blainey, P. (2014) Points of Significance: Nested designs Nature Methods 11:977-978.

Background reading

Blainey, P., Krzywinski, M. & Altman, N. (2014) Points of Significance: Replication Nature Methods 11:879-880.

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

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

...more about the Points of Significance column

Replication—Quality over Quantity

Tue 02-09-2014

It's fitting that the column published just before Labor day weekend is all about how to best allocate labor.

Replication is used to decrease the impact of variability from parts of the experiment that contribute noise. For example, we might measure data from more than one mouse to attempt to generalize over all mice.

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

It's important to distinguish technical replicates, which attempt to capture the noise in our measuring apparatus, from biological replicates, which capture biological variation. The former give us no information about biological variation and cannot be used to directly make biological inferences. To do so is to commit pseudoreplication. Technical replicates are useful to reduce the noise so that we have a better chance to detect a biologically meaningful signal.

Blainey, P., Krzywinski, M. & Altman, N. (2014) Points of Significance: Replication Nature Methods 11:879-880.

Background reading

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

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

...more about the Points of Significance column

Monkeys on a Hilbert Curve—Scientific American Graphic

Tue 19-08-2014

I was commissioned by Scientific American to create an information graphic that showed how our genomes are more similar to those of the chimp and bonobo than to the gorilla.

I had about 5 x 5 inches of print space to work with. For 4 genomes? No problem. Bring out the Hilbert curve!

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Our genomes are much more similar to the chimp and bonobo than to the gorilla. And, we're practically still Denisovans. (details)

To accompany the piece, I will be posting to the Scientific American blog about the process of creating the figure. And to emphasize that the genome is not a blueprint!

As part of this project, I created some Hilbert curve art pieces. And while exploring, found thousands of Hilbertonians!

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

Wed 13-08-2014

Celebrate Pi Approximation Day (July 22nd) with the art of 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.