A function to layout a matrix of canvases.