def duplicate_input(in_list, nrows, ncols, in_type):
    """Duplicate an input value (if necessary) to match number of plots."""

    if len(in_list) == 1:
        out_list = in_list * (nrows * ncols)
    else:
        out_list = in_list

    assert len(out_list) == (nrows * ncols), \
    "Must specify an output %s for each plot" %(in_type)

    return out_list