def set_context(context='paper', fscale=1., figsize=(8., 7.)):
    """
    Most of this code has been copied/modified from seaborn.rcmod.plotting_context()
    ::Arguments::
        context (str): 'paper', 'notebook', 'talk', or 'poster'
        fscale (float): font-size scalar applied to axes ticks, legend, labels, etc.
    """
    # scale all the parameters by the same factor depending on the context
    scaling = dict(paper=.8, notebook=1, talk=1.3, poster=1.6)[context]
    context_dict = {k: v * scaling for k, v in base_context.items()}

    # scale default figsize
    figX, figY = figsize
    context_dict["figure.figsize"] = (figX*scaling, figY*scaling)

    # independently scale the fonts
    font_dict = {k: v * fscale for k, v in base_font.items()}
    font_dict["font.family"] = ["sans-serif"]
    font_dict["font.sans-serif"] = ["Helvetica", "Helvetica Neue", "Arial",
                                "DejaVu Sans", "Liberation Sans", "sans-serif"]
    context_dict.update(font_dict)
    return context_dict
Most of this code has been copied/modified from seaborn.rcmod.plotting_context()
    ::Arguments::
        context (str): 'paper', 'notebook', 'talk', or 'poster'
        fscale (float): font-size scalar applied to axes ticks, legend, labels, etc.