def plot_dipole_amplitudes(dipoles, colors=None, show=True):
    'Plot the amplitude traces of a set of dipoles.\n\n    Parameters\n    ----------\n    dipoles : list of instance of Dipole\n        The dipoles whose amplitudes should be shown.\n    colors : list of color | None\n        Color to plot with each dipole. If None default colors are used.\n    show : bool\n        Show figure if True.\n\n    Returns\n    -------\n    fig : 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
    if (colors is None):
        colors = cycle(_get_color_list())
    (fig, ax) = plt.subplots(1, 1)
    xlim = [np.inf, (- np.inf)]
    for (dip, color) in zip(dipoles, colors):
        ax.plot(dip.times, (dip.amplitude * 1000000000.0), color=color, linewidth=1.5)
        xlim[0] = min(xlim[0], dip.times[0])
        xlim[1] = max(xlim[1], dip.times[(- 1)])
    ax.set(xlim=xlim, xlabel='Time (s)', ylabel='Amplitude (nAm)')
    if show:
        fig.show(warn=False)
    return fig
Plot the amplitude traces of a set of dipoles.

Parameters
----------
dipoles : list of instance of Dipole
    The dipoles whose amplitudes should be shown.
colors : list of color | None
    Color to plot with each dipole. If None default colors are used.
show : bool
    Show figure if True.

Returns
-------
fig : matplotlib.figure.Figure
    The figure object containing the plot.

Notes
-----
.. versionadded:: 0.9.0
def plot_dipole_amplitudes(dipoles, colors=None, show=True):
    'Plot the amplitude traces of a set of dipoles.\n\n    Parameters\n    ----------\n    dipoles : list of instance of Dipole\n        The dipoles whose amplitudes should be shown.\n    colors : list of color | None\n        Color to plot with each dipole. If None default colors are used.\n    show : bool\n        Show figure if True.\n\n    Returns\n    -------\n    fig : 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
    if (colors is None):
        colors = cycle(_get_color_list())
    (fig, ax) = plt.subplots(1, 1)
    xlim = [np.inf, (- np.inf)]
    for (dip, color) in zip(dipoles, colors):
        ax.plot(dip.times, (dip.amplitude * 1000000000.0), color=color, linewidth=1.5)
        xlim[0] = min(xlim[0], dip.times[0])
        xlim[1] = max(xlim[1], dip.times[(- 1)])
    ax.set(xlim=xlim, xlabel='Time (s)', ylabel='Amplitude (nAm)')
    if show:
        fig.show(warn=False)
    return fig