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 - Pi Art Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Hilbertonians - Creatures on the Hilbert Curve
This love loves love. It's a strange love, strange love.Liz Fraserfind a way to lovemore quotes

gravity: fun


EMBO Practical Course: Bioinformatics and Genome Analysis, 5–17 June 2017.


visualization + design

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The 2017 Pi Day art imagines the digits of Pi as a star catalogue with constellations of extinct animals and plants. The work is featured in the article Pi in the Sky at the Scientific American SA Visual blog.

`\pi` Day 2016 Art Posters


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2017 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` approximation day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2015 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` approx day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2013 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Circular `\pi` art

On March 14th celebrate `\pi` Day. Hug `\pi`—find a way to do it.

For those who favour `\tau=2\pi` will have to postpone celebrations until July 26th. That's what you get for thinking that `\pi` is wrong.

If you're not into details, you may opt to party on July 22nd, which is `\pi` approximation day (`\pi` ≈ 22/7). It's 20% more accurate that the official `\pi` day!

Finally, if you believe that `\pi = 3`, you should read why `\pi` is not equal to 3.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
All art posters are available for purchase.
I take custom requests.

This year's `\pi` day art collection celebrates not only the digit but also one of the fundamental forces in nature: gravity.

In February of 2016, for the first time, gravitational waves were detected at the Laser Interferometer Gravitational-Wave Observatory (LIGO).

The signal in the detector was sonified—a process by which any data can be encoded into sound to provide hints at patterns and structure that we might otherwise miss—and we finally heard what two black holes sound like. A buzz and chirp.

The art is featured in the Gravity of Pi article on the Scientific American SA Visual blog.

this year's theme music

All the art was processed while listening to Roses by Coeur de Pirate, a brilliant female French-Canadian songwriter, who sounds like a mix of Patricia Kaas and Lhasa. The lyrics Oublie-moi (Forget me) are fitting with this year's theme of gravity.

Mais laisse-moi tomber, laisse-nous tomber
Laisse la nuit trembler en moi
Laisse-moi tomber, laisse nous tomber
Cette fois

But let me fall, let us fall
Let the night tremble in me
Let me fall, let us fall
This time

The art is generated by running a simulation of gravity in which digits of `\pi` are each assigned a mass and allowed to collide eand orbit each other.

The mathematical details of the simulation can be found in the code section.

exploring force of gravity in `\pi`

A simulation starts with taking `n` digits of `\pi` and arranging them uniformly around a circle. The mass of each digit, `d_i` (e.g. 3), is given by `(1+d)^k` where `k` is a mass power parameter between 0.01 and 1. For example, if `k=0.42` then the mass of 3 is `(1+3)^{0.42} = 1.79`.

collapsing three digits—3.14 collide

The figure below shows the evolution of a simulation with `n=3` digits and `k=1`. The digits 3 and 4 collide to form the digit `3+4 = 7` and immediately collides with 1 to form `7+1=8`. With only one mass left in the system, the simulation stops.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of a simulation of gravity using `n=3` digits of `\pi` and the mass power `k=1`. The masses are initialized with zero velocity. (zoom)

adding initial velocity to each mass

When masses have initial velocities, the patterns quickly start to get interesting. In the figure above, the masses are initalized with zero velocity. As soon as the simulation, each mass immediately starts to move directly towards the center of mass of the other two masses.

When the initial velocity is non-zero, such as in the figure below, the masses don't immediately collapse towards one another. The masses first travel with their initial velocity but immediately the gravitational force imparts acceleration that alters this velocity. In the examples below, only those simulations in which the masses collapsed within a time cutoff are shown.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of a simulation of gravity using `n=3` digits of `\pi` and the mass power `k=1` in which all masses collapsed. The masses are initialized with a random velocity. (zoom)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of 16 simulations of gravity using `n=3` digits of `\pi` and the mass power `k=1` in which all masses collapsed. The masses are initialized with a random velocity. (zoom)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of 49 simulations of gravity using `n=3` digits of `\pi` and the mass power `k=1` in which all masses collapsed. The masses are initialized with a random velocity. (zoom)

allowing the simulation to evolve

Depending on the initial velocities, some systems collapse very quickly, which doesn't make for interesting patterns.

For example, the simulations above evolved over 100,000 steps and in some cases the masses collapsed within 10,000 steps. In the figure below, I require that the system evolves for at least 15,000 steps before collapsing. Lovely doddles, don't you think?


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of 36 simulations of gravity using `n=3` digits of `\pi` and the mass power `k=1` in which all masses collapsed after a minimum amount of time. The masses are initialized with a random velocity. (zoom)

exploring ensembles

When a simulation is repeated with different initial conditions, the set of outcomes is called an ensemble.

Below, I repeat the simulation 100 times with `n=3` and `k=0.2`, each time with slightly different initial velocity. The velocities have their `x`- and `y`-components normally distributed with zero mean and a fixed variance. Each of the four ensembles has its simulations evolve over progressively more time steps: 5,000, 7,500, 10,000, and 20,000.

You can see that with 5,000 steps the masses don't yet have a chance to collide. After 7,500, there have been collisions in a small number of systems. The blue mass corresponds to the 3 colliding with 4 and the green mass to 1 colliding with 4. After 10,000, even more collisions are seen and in 3 cases we see total collapse (all three digits collided). After 20,000,


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The evolution of 100 simulations of gravity over total time `t` using `n=3` digits of `\pi` and the mass power `k=0.2`. Within each ensemble, the masses are initialized with a different random velocity in each instance. (zoom)

varying masses

The value of `k` greatly impacts the outcome of the simulation. When `k` is very small, all the digits have essentially the same mass. For example, when `k=0.01` the 0 has a mass of 1 and 9 has a mass of 1.02.

When `k` is large, the difference in masses is much greater. For example, for `k=2` the lightest mass is `(1+0)^2=1` and the heaviest `(1+9)^2=10`. Because the acceleration of a mass is proportional to the mass that is attracting it, in a pair of masses the light mass will accelerate faster.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Larger values of `k` create greater diversity among the masses. Shown are simulations of 36 digits with `k` values varying from 0.1 to 3. The total mass of the system, `\Sigma m`, is also shown.`. (zoom)

increasing number of masses

As the number of digits is increased, the pattern of collapse doesn't qualitatively change.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Simulations for `n = 50, 100, 250` and `500` masses with `k = 0.5`. (zoom)

gravity makes beautiful doodles

I ran a large number of simulations. For various values of `n` and `k`, I repeated the simulation several times to sample different intial velocities.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Thumbnails of `\pi` digit orbital simulations for various values of `n` and `k`. (zoom)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Gravitational attraction paths of the first 100 digits of `\pi` for `k = 0.3`, `0.6` and `0.8` with initial velocities randomly set. Three instances of the simulation are shown, each with different intital velocities. (zoom)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Gravitational attraction paths of the first 60 digits of `\pi` for `k = 1`. After 100,000 time steps, some masses are still orbiting within the canvas (e.g. green mass at bottom right). The numbers next to the masses correspond to the digits (those around the circle are the first 50 digits of `\pi` and others are the sum (mod 10) of digits that collided). Also shown next to the numbers is their mass, index and indices of masses that formed them. (zoom)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Gravitational attraction paths of the first 50 digits of `\pi` for `k = 0.4`. The numbers next to the masses correspond to the digits (those around the circle are the first 50 digits of `\pi` and others are the sum (mod 10) of digits that collided). (zoom)

Below is a great example of how a stable orbital pattern of a pair of masses can be disrupted by the presence of another mass. You can see on the left that once the light red mass moves away from the orange/green pair, they settle into a stable pattern.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Gravitational attraction paths of the first 50 digits of `\pi` for `k = 0.9`. The numbers next to the masses correspond to the digits (those around the circle are the first 50 digits of `\pi` and others are the sum (mod 10) of digits that collided). (zoom)

The figure below shows one of my favourite patterns. As the digits collide, three masses remain, which leave the system. They remain under each other's gravitational influence, but are moving too quickly to return to the canvas within the time of the simulation.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Gravitational attraction paths of the first 90 digits of `\pi` for `k = 0.8`. The digits collide, leaving three rapidly-moving masses, which leave the canvas. (zoom)

how the idea developed

interactive gravity simulator

Use this fun inteactive gravity simulator if you want to drop your own masses and watch them orbit.

VIEW ALL

news + thoughts

Happy 2017 `\pi` Day—Star Charts, Creatures Once Living and a Poem

Tue 14-03-2017


on a brim of echo,

capsized chamber
drawn into our constellation, and cooling.
—Paolo Marcazzan

Celebrate `\pi` Day (March 14th) with star chart of the digits. The charts draw 40,000 stars generated from the first 12 million digits.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
12,000,000 digits of `\pi` interpreted as a star catalogue. (details)

The 80 constellations are extinct animals and plants. Here you'll find old friends and new stories. Read about how Desmodus is always trying to escape or how Megalodon terrorizes the poor Tecopa! Most constellations have a story.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Find friends and stories among the 80 constellations of extinct animals and plants. Oh look, a Dodo guardings his eggs! (details)

This year I collaborate with Paolo Marcazzan, a Canadian poet, who contributes a poem, Of Black Body, about space and things we might find and lose there.

Check out art from previous years: 2013 `\pi` Day and 2014 `\pi` Day, 2015 `\pi` Day and and 2016 `\pi` Day.

Data in New Dimensions: convergence of art, genomics and bioinformatics

Tue 07-03-2017

Art is science in love.
— E.F. Weisslitz

A behind-the-scenes look at the making of our stereoscopic images which were at display at the AGBT 2017 Conference in February. The art is a creative collaboration with Becton Dickinson and The Linus Group.

Its creation began with the concept of differences and my writeup of the creative and design process focuses on storytelling and how concept of differences is incorporated into the art.

Oh, and this might be a good time to pick up some red-blue 3D glasses.

BD Genomics 3D art exhibit - AGBT 2017 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A stereoscopic image and its interpretive panel of single-cell transcriptomes of blood cells: diseased versus healthy control.

Interpreting P values

Thu 02-03-2017
A P value measures a sample’s compatibility with a hypothesis, not the truth of the hypothesis.

This month we continue our discussion about `P` values and focus on the fact that `P` value is a probability statement about the observed sample in the context of a hypothesis, not about the hypothesis being tested.

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

Given that we are always interested in making inferences about hypotheses, we discuss how `P` values can be used to do this by way of the Benjamin-Berger bound, `\bar{B}` on the Bayes factor, `B`.

Heuristics such as these are valuable in helping to interpret `P` values, though we stress that `P` values vary from sample to sample and hence many sources of evidence need to be examined before drawing scientific conclusions.

Altman, N. & Krzywinski, M. (2017) Points of Significance: Interpreting P values. Nature Methods 14:213–214.

Background reading

Krzywinski, M. & Altman, N. (2017) Points of significance: P values and the search for significance. Nature Methods 14:3–4.

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

Snellen Charts—Typography to Really Look at

Sat 18-02-2017

Another collection of typographical posters. These ones really ask you to look.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Snellen charts designed using physical constants, Braille and elemental abundances in the universe and human body.

The charts show a variety of interesting symbols and operators found in science and math. The design is in the style of a Snellen chart and typset with the Rockwell font.

Essentials of Data Visualization—8-part video series

Fri 17-02-2017
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca

In collaboration with the Phil Poronnik and Kim Bell-Anderson at the University of Sydney, I'm delighted to share with you our 8-part video series project about thinking about drawing data and communicating science.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Essentials of Data Visualization: Thinking about drawing data and communicating science.

We've created 8 videos, each focusing on a different essential idea in data visualization: encoding, shapes, color, uncertainty, design, drawing missing or unobserved data, labels and process.

The videos were designed as teaching materials. Each video comes with a slide deck and exercises.

P values and the search for significance

Mon 16-01-2017
Little P value
What are you trying to say
Of significance?
—Steve Ziliak

We've written about P values before and warned readers about common misconceptions about them, which are so rife that the American Statistical Association itself has a long statement about them.

This month is our first of a two-part article about P values. Here we look at 'P value hacking' and 'data dredging', which are questionable practices that invalidate the correct interpretation of P values.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: P values and the search for significance. (read)

We also illustrate how P values can lead us astray by asking "What is the smallest P value we can expect if the null hypothesis is true but we have done many tests, either explicitly or implicitly?"

Incidentally, this is our first column in which the standfirst is a haiku.

Altman, N. & Krzywinski, M. (2017) Points of Significance: P values and the search for significance. Nature Methods 14:3–4.

Background reading

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