Page MenuHomePhabricator

Heatmap
ActivePublic

Authored by Gilles on Oct 23 2014, 10:13 PM.
Table table = loadTable("viewport.csv", "header");
size(2500, 2500);
background(0);
for (TableRow row : table.rows()) {
int count = row.getInt("count");
int width = row.getInt("width");
int height = row.getInt("height");
stroke( 255.0, min( 255.0, (log( float( count ) ) / 4.8) * 255.0), 0.0 );
point(width, height);
}
save("viewport heatmap.png");