def get_subplot_dims(num_plots, max_cols=3):
    """Return subplot layout for a given number of plots"""
    if num_plots <= max_cols:
        num_rows = 1
        num_cols = num_plots
    else:
        num_rows = num_plots // max_cols
        remainder = num_plots % max_cols
        if remainder > 0:
            num_rows += 1
        num_cols = max_cols
    return num_rows, num_cols
