Exemple #1
0
def plot_fg_ap(fg, ax=None, **plot_kwargs):
    """Plot aperiodic fit parameters, in a scatter plot.

    Parameters
    ----------
    fg : FOOOFGroup
        Object to plot data from.
    ax : matplotlib.Axes, optional
        Figure axes upon which to plot.
    **plot_kwargs
        Keyword arguments to pass into the ``style_plot``.
    """

    if fg.aperiodic_mode == 'knee':
        plot_scatter_2(fg.get_params('aperiodic_params', 'exponent'),
                       'Knee',
                       fg.get_params('aperiodic_params', 'knee'),
                       'Exponent',
                       'Aperiodic Fit',
                       ax=ax)
    else:
        plot_scatter_1(fg.get_params('aperiodic_params', 'exponent'),
                       'Exponent',
                       'Aperiodic Fit',
                       ax=ax)
Exemple #2
0
def plot_fg_bg(fg, ax=None):
    """Plot aperiodic fit parameters, in a scatter plot.

    Parameters
    ----------
    fg : FOOOFGroup() object
        Group object from which to plot data.
    ax : matplotlib.Axes, optional
        Figure axes upon which to plot.
    """

    if fg.aperiodic_mode == 'knee':
        plot_scatter_2(fg.get_all_data('aperiodic_params', 1), 'Knee',
                       fg.get_all_data('aperiodic_params', 2), 'Exponent',
                       'Aperiodic Fit', ax=ax)
    else:
        plot_scatter_1(fg.get_all_data('aperiodic_params', 1), 'Exponent',
                       'Aperiodic Fit', ax=ax)
Exemple #3
0
def plot_fg_bg(fg, ax=None):
    """Plot background fit parameters, in a scatter plot.

    Parameters
    ----------
    fg : FOOOFGroup() object
        Group object from which to plot data.
    ax : matplotlib.Axes, optional
        Figure axes upon which to plot.
    """

    if fg.background_mode == 'knee':
        plot_scatter_2(fg.get_all_data('background_params', 1),
                       'Knee',
                       fg.get_all_data('background_params', 2),
                       'Slope',
                       'Background Fit',
                       ax=ax)
    else:
        plot_scatter_1(fg.get_all_data('background_params', 1),
                       'Slope',
                       'Background Fit',
                       ax=ax)