-----
    Brief
    -----
    With this plotting function it will be possible to plot simultaneously (in pairs) "Original"/
    "Filtered"/"Differentiated"/"Rectified"/"Integrated" ECG signals used at "Pan-Tompkins R Peaks
    Detection Algorithm".

    -----------
    Description
    -----------
    Function intended to generate a Bokeh figure with 1x2 format, being 1 the of rows and 2 the number
    of columns.

    At the first column is plotted the ECG signal resulting from pre-process step i while in the second
    column it is presented the ECG signal resulting from pre-process step i+1.

    Applied in the Notebook titled "Event Detection - R Peaks (ECG)".

    ----------
    Parameters
    ----------
    time : list
        List containing the time-axis sequence of values.

    orig_ecg : list
        Sequence of sampled values (Original ECG).

    pre_process_ecg : list
        Sequence of sampled values (Pre-Processed ECG).

    sampling_rate : int
        Acquisition sampling rate (Hz)

    titles : list
        List containing the title of each subplot.

def plot_ecg_pan_tompkins_steps(time, orig_ecg, pre_process_ecg, sampling_rate, titles):
    """
    -----
    Brief
    -----
    With this plotting function it will be possible to plot simultaneously (in pairs) "Original"/
    "Filtered"/"Differentiated"/"Rectified"/"Integrated" ECG signals used at "Pan-Tompkins R Peaks
    Detection Algorithm".

    -----------
    Description
    -----------
    Function intended to generate a Bokeh figure with 1x2 format, being 1 the of rows and 2 the number
    of columns.

    At the first column is plotted the ECG signal resulting from pre-process step i while in the second
    column it is presented the ECG signal resulting from pre-process step i+1.

    Applied in the Notebook titled "Event Detection - R Peaks (ECG)".

    ----------
    Parameters
    ----------
    time : list
        List containing the time-axis sequence of values.

    orig_ecg : list
        Sequence of sampled values (Original ECG).

    pre_process_ecg : list
        Sequence of sampled values (Pre-Processed ECG).

    sampling_rate : int
        Acquisition sampling rate (Hz)

    titles : list
        List containing the title of each subplot.

    """

    if len(titles) == 2:
        # Representation of the output of Step 1 of Pan-Tompkins R-Peak Detection Algorithm.
        # List that store the figure handler
        list_figures_1 = [[]]

        # Plotting of Original Signal
        list_figures_1[-1].append(figure(x_axis_label='Time (s)', y_axis_label='Raw Data',
                                         title=titles[0], **opensignals_kwargs("figure")))
        list_figures_1[-1][-1].line(time[:sampling_rate], orig_ecg[:sampling_rate], **opensignals_kwargs("line"))

        # Plotting of Filtered Signal
        list_figures_1[-1].append(figure(x_axis_label='Time (s)', y_axis_label='Raw Data',
                                         title=titles[1], **opensignals_kwargs("figure")))
        list_figures_1[-1][-1].line(time[:sampling_rate], pre_process_ecg[:sampling_rate], **opensignals_kwargs("line"))

        # Grid-Plot.
        opensignals_style([item for sublist in list_figures_1 for item in sublist])
        grid_plot_1 = gridplot(list_figures_1, **opensignals_kwargs("gridplot"))
        show(grid_plot_1)
    else:
        raise RuntimeError("The field 'title' must be a list of strings with size 2 !")