Page MenuHomePhabricator

Heatmap
ActivePublic

Authored by Gilles on Oct 23 2014, 10:13 PM.
Referenced Files
F406: Heatmap
Oct 23 2014, 10:13 PM
Subscribers
None
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");

Event Timeline

Gilles changed the title of this paste from untitled to Heatmap.
Gilles updated the paste's language from autodetect to java.
Gilles added a project: Multimedia.