def measureCanvas(nfigs, ncols_max=2, figinches=(6, 4)):
    """
    @params nfigs    : (int) Total number of figures.
    @params ncols_max: (int) The number of columns.
    @params figinches: (tuple) The figure size for 1 plot.
    """
    if nfigs >= ncols_max:
        ncols = ncols_max
        nrows = (nfigs - 1) // ncols_max + 1
    else:
        ncols = nfigs
        nrows = 1
    w, h = figinches
    figsize = w * ncols, h * nrows
    return ncols, nrows, figsize
