-----
    Brief
    -----
    A plot with frequency power spectrum of the input EMG signal is presented graphically, highlighting maximum and
    median power frequency.

    -----------
    Description
    -----------
    Function intended to generate a single Bokeh figure graphically describing and identifying maximum and median
    power frequency on Power Spectrum.

    Applied in the Notebook titled "EMG Analysis - Time and Frequency Parameters".

    ----------
    Parameters
    ----------
    freq_axis : list
        List with the values of power spectrum frequency axis.

    power_axis : list
        List with the values of power spectrum y axis (relative weight of the frequency component on signal
        reconstruction.

    max_freq : float
        Frequency value registered when the maximum power is reached on the spectrum.

    median_freq : float
        Frequency value registered when the half of the total power is reached on the cumulative power spectrum.

def plot_emg_spect_freq(freq_axis, power_axis, max_freq, median_freq):
    """
    -----
    Brief
    -----
    A plot with frequency power spectrum of the input EMG signal is presented graphically, highlighting maximum and
    median power frequency.

    -----------
    Description
    -----------
    Function intended to generate a single Bokeh figure graphically describing and identifying maximum and median
    power frequency on Power Spectrum.

    Applied in the Notebook titled "EMG Analysis - Time and Frequency Parameters".

    ----------
    Parameters
    ----------
    freq_axis : list
        List with the values of power spectrum frequency axis.

    power_axis : list
        List with the values of power spectrum y axis (relative weight of the frequency component on signal
        reconstruction.

    max_freq : float
        Frequency value registered when the maximum power is reached on the spectrum.

    median_freq : float
        Frequency value registered when the half of the total power is reached on the cumulative power spectrum.

    """

    # List that store the figure handler
    list_figures = []

    # Plotting of EMG Power Spectrum
    list_figures.append(
        figure(x_axis_label='Frequency (Hz)', y_axis_label='Relative Power (a.u.)', **opensignals_kwargs("figure")))
    list_figures[-1].line(freq_axis, power_axis, legend="Power Spectrum", **opensignals_kwargs("line"))
    list_figures[-1].patch(list(freq_axis) + list(freq_axis)[::-1], list(power_axis) + list(numpy.zeros(len(power_axis))),
                           fill_color=opensignals_color_pallet(), fill_alpha=0.5, line_alpha=0,
                           legend="Area Under Curve")
    list_figures[-1].line([median_freq, median_freq], [0, power_axis[numpy.where(freq_axis == median_freq)[0][0]]],
                          legend="Median Frequency", **opensignals_kwargs("line"))
    list_figures[-1].line([max_freq, max_freq], [0, power_axis[numpy.where(freq_axis == max_freq)[0][0]]],
                          legend="Maximum Power Frequency", **opensignals_kwargs("line"))

    # Show figure.
    opensignals_style(list_figures)
    show(list_figures[-1])