

def _connection_line(x, fig, sourceax, targetax):
    'Helper function to connect time series and topolots'
    from matplotlib.lines import Line2D
    transFigure = fig.transFigure.inverted()
    tf = fig.transFigure
    (xt, yt) = transFigure.transform(targetax.transAxes.transform([0.5, 0.25]))
    (xs, _) = transFigure.transform(sourceax.transData.transform([x, 0]))
    (_, ys) = transFigure.transform(sourceax.transAxes.transform([0, 1]))
    return Line2D((xt, xs), (yt, ys), transform=tf, color='grey', linestyle='-', linewidth=1.5, alpha=0.66, zorder=0)

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