

def plot_snr_estimate(evoked, inv, show=True):
    'Plot a data SNR estimate\n\n    Parameters\n    ----------\n    evoked : instance of Evoked\n        The evoked instance. This should probably be baseline-corrected.\n    inv : instance of InverseOperator\n        The minimum-norm inverse operator.\n    show : bool\n        Show figure if True.\n\n    Returns\n    -------\n    fig : instance of matplotlib.figure.Figure\n        The figure object containing the plot.\n\n    Notes\n    -----\n    .. versionadded:: 0.9.0\n    '
    import matplotlib.pyplot as plt
    from ..minimum_norm import estimate_snr
    (snr, snr_est) = estimate_snr(evoked, inv, verbose=True)
    (fig, ax) = plt.subplots(1, 1)
    lims = np.concatenate([evoked.times[[0, (- 1)]], [(- 1), snr_est.max()]])
    ax.plot([0, 0], lims[2:], 'k:')
    ax.plot(lims[:2], [0, 0], 'k:')
    ax.plot(evoked.times, snr_est, color=[0.0, 0.6, 0.5])
    ax.plot(evoked.times, snr, color=[0.8, 0.4, 0.0])
    ax.set_xlim(lims[:2])
    ax.set_ylim(lims[2:])
    ax.set_ylabel('SNR')
    ax.set_xlabel('Time (sec)')
    if (evoked.comment is not None):
        ax.set_title(evoked.comment)
    plt.draw()
    plt_show(show)
    return fig

dataset/ETHPy150Open mne-tools/mne-python/mne/viz/evoked.py plot_snr_estimate/original