def plot_emg_graphical_durations(max_time, min_time, avg_time, std_time):
    """
    -----
    Brief
    -----
    This plotting function ensures a graphical representation of maximum, minimum and average time
    durations of the muscular activation periods.

    -----------
    Description
    -----------
    Function intended to generate a single Bokeh figure graphically describing and identifying
    some statistical parameters related with the time duration of the muscular activation periods
    that compose the input EMG signal.

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

    ----------
    Parameters
    ----------
    max_time : float
        Time duration of the longest EMG muscular activation.

    min_time : float
        Time duration of the shortest EMG muscular activation.

    avg_time : float
        Average time duration of the EMG muscular activation set.

    std_time : int
        Standard deviation of the muscular activation time duration relatively to avg_time.
    """

    # List that store the figure handler
    list_figures_1 = []
    color_1 = "#009EE3"
    color_2 = "#00893E"
    color_3 = "#E84D0E"
    color_4 = "#CF0272"

    # Plotting of Burst duration distribution
    list_figures_1.append(figure(x_axis_label='Time (s)', **opensignals_kwargs("figure"), x_range=[0, max_time], y_range=[0, 1]))
    box_annotation_max = BoxAnnotation(left=0, right=max_time, top=0.33, bottom=0, fill_color=color_1, fill_alpha=0.5)
    list_figures_1[-1].rect(0, 0, width=0, height=0, fill_color=color_1, fill_alpha=0.5, legend="Maximum Burst Time")
    list_figures_1[-1].add_layout(box_annotation_max)

    box_annotation_avg = BoxAnnotation(left=0, right=avg_time, top=0.66, bottom=0.33, fill_color=color_2, fill_alpha=0.5)
    list_figures_1[-1].rect(0, 0, width=0, height=0, fill_color=color_2, fill_alpha=0.5, legend="Average Burst Time")
    list_figures_1[-1].add_layout(box_annotation_avg)

    box_annotation_min = BoxAnnotation(left=0, right=min_time, top=1, bottom=0.66, fill_color=color_3, fill_alpha=0.5)
    list_figures_1[-1].rect(0, 0, width=0, height=0, fill_color=color_3, fill_alpha=0.5, legend="Minimum Burst Time")
    list_figures_1[-1].add_layout(box_annotation_min)

    box_annotation_std = BoxAnnotation(left=avg_time, right=avg_time + std_time, top=0.55, bottom=0.44, fill_color=color_4, fill_alpha=0.5)
    list_figures_1[-1].rect(0, 0, width=0, height=0, fill_color=color_4, fill_alpha=0.5, legend="Average + Standard Deviation Time")
    list_figures_1[-1].add_layout(box_annotation_std)

    # Show figure.
    opensignals_style(list_figures_1)
    show(list_figures_1[-1])
def plot_emg_graphical_durations ( max_time , min_time , avg_time , std_time ) : list_figures_1 = [ ] color_1 = "#009EE3" color_2 = "#00893E" color_3 = "#E84D0E" color_4 = "#CF0272" list_figures_1 . append ( figure ( x_axis_label = 'Time (s)' , ** opensignals_kwargs ( "figure" ) , x_range = [ 0 , max_time ] , y_range = [ 0 , 1 ] ) ) box_annotation_max = BoxAnnotation ( left = 0 , right = max_time , top = 0.33 , bottom = 0 , fill_color = color_1 , fill_alpha = 0.5 ) list_figures_1 [ - 1 ] . rect ( 0 , 0 , width = 0 , height = 0 , fill_color = color_1 , fill_alpha = 0.5 , legend = "Maximum Burst Time" ) list_figures_1 [ - 1 ] . add_layout ( box_annotation_max ) box_annotation_avg = BoxAnnotation ( left = 0 , right = avg_time , top = 0.66 , bottom = 0.33 , fill_color = color_2 , fill_alpha = 0.5 ) list_figures_1 [ - 1 ] . rect ( 0 , 0 , width = 0 , height = 0 , fill_color = color_2 , fill_alpha = 0.5 , legend = "Average Burst Time" ) list_figures_1 [ - 1 ] . add_layout ( box_annotation_avg ) box_annotation_min = BoxAnnotation ( left = 0 , right = min_time , top = 1 , bottom = 0.66 , fill_color = color_3 , fill_alpha = 0.5 ) list_figures_1 [ - 1 ] . rect ( 0 , 0 , width = 0 , height = 0 , fill_color = color_3 , fill_alpha = 0.5 , legend = "Minimum Burst Time" ) list_figures_1 [ - 1 ] . add_layout ( box_annotation_min ) box_annotation_std = BoxAnnotation ( left = avg_time , right = avg_time + std_time , top = 0.55 , bottom = 0.44 , fill_color = color_4 , fill_alpha = 0.5 ) list_figures_1 [ - 1 ] . rect ( 0 , 0 , width = 0 , height = 0 , fill_color = color_4 , fill_alpha = 0.5 , legend = "Average + Standard Deviation Time" ) list_figures_1 [ - 1 ] . add_layout ( box_annotation_std ) opensignals_style ( list_figures_1 ) show ( list_figures_1 [ - 1 ] )
-----
    Brief
    -----
    This plotting function ensures a graphical representation of maximum, minimum and average time
    durations of the muscular activation periods.

    -----------
    Description
    -----------
    Function intended to generate a single Bokeh figure graphically describing and identifying
    some statistical parameters related with the time duration of the muscular activation periods
    that compose the input EMG signal.

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

    ----------
    Parameters
    ----------
    max_time : float
        Time duration of the longest EMG muscular activation.

    min_time : float
        Time duration of the shortest EMG muscular activation.

    avg_time : float
        Average time duration of the EMG muscular activation set.

    std_time : int
        Standard deviation of the muscular activation time duration relatively to avg_time.