All examples By author By category About

micahstubbs

Correlation Matrix II

This example adds labels for the index, row, and column of the scatterplot matrix to help reason about the grid layout. I wanted this example to maintain the color-by-diagonal pattern. After labeling the grid cells and some experimentation, I realized that

var row = Math.floor(i % rows);
var col = Math.floor(i / rows);
colors(row + col)

would generate the pattern I was looking for.

When a measure intersects with itself, this example shows the name of that measure in the style of the pairs plot implemented in the R package ggplot2.

Forked from Correlation Matrix I by micahstubbs

Originally inspired by the Simple Correlation Matrix block from emeeks