ctaplot/gammaboard/gammaboard.py
def create_update_color(experiments_dict, fig_resolution, visible_experiments):
    """
    Function that creates the callback to update curve color.
    Args
        experiments_dict: the dictionary of loaded experiments
        fig_resolution: the figure containing the plots
        visible_experiments: the set of plotted experiments
    """
    def update_color(change):
        """
        Function to be called when a `ipywidgets.Button` is clicked

        Args
            sender: the object received by `ipywidgets.Button().on_click()`
        """
        exp_name = change['owner'].description
        if exp_name not in experiments_dict:
            pass

        exp = experiments_dict[exp_name]
        exp.color = change['new']

        axes = fig_resolution.get_axes()

        for ax in axes:
            for c in ax.containers:
                if exp.name in c.get_label():
                    c.remove()
                    ax.containers.remove(c)

            for l in ax.lines:
                if exp.name in l.get_label():
                    l.remove()

            for c in ax.collections:
                if exp.name in c.get_label():
                    c.remove()

        plot_exp_on_fig(exp, fig_resolution)
        update_legend(visible_experiments, fig_resolution)
        update_pr_legend(visible_experiments, axes[6])
        update_auc_legend(visible_experiments, axes[4])

    return update_color

    Function that creates the callback to update curve color.
    Args
        experiments_dict: the dictionary of loaded experiments
        fig_resolution: the figure containing the plots
        visible_experiments: the set of plotted experiments
    
Function that creates the callback to update curve color.
Args
experiments_dict: the dictionary of loaded experiments
fig_resolution: the figure containing the plots
visible_experiments: the set of plotted experiments
Function that creates the callback to update curve color . Args experiments_dict : the dictionary of loaded experiments fig_resolution : the figure containing the plots visible_experiments : the set of plotted experiments
def create_update_color(experiments_dict, fig_resolution, visible_experiments):
    def update_color(change):
        exp_name = change['owner'].description
        if exp_name not in experiments_dict:
            pass
        exp = experiments_dict[exp_name]
        exp.color = change['new']
        axes = fig_resolution.get_axes()
        for ax in axes:
            for c in ax.containers:
                if exp.name in c.get_label():
                    c.remove()
                    ax.containers.remove(c)
            for l in ax.lines:
                if exp.name in l.get_label():
                    l.remove()
            for c in ax.collections:
                if exp.name in c.get_label():
                    c.remove()
        plot_exp_on_fig(exp, fig_resolution)
        update_legend(visible_experiments, fig_resolution)
        update_pr_legend(visible_experiments, axes[6])
        update_auc_legend(visible_experiments, axes[4])
    return update_color
def create_update_color ( experiments_dict , fig_resolution , visible_experiments ) : def update_color ( change ) : """
        Function to be called when a `ipywidgets.Button` is clicked

        Args
            sender: the object received by `ipywidgets.Button().on_click()`
        """ exp_name = change [ 'owner' ] . description if exp_name not in experiments_dict : pass exp = experiments_dict [ exp_name ] exp . color = change [ 'new' ] axes = fig_resolution . get_axes ( ) for ax in axes : for c in ax . containers : if exp . name in c . get_label ( ) : c . remove ( ) ax . containers . remove ( c ) for l in ax . lines : if exp . name in l . get_label ( ) : l . remove ( ) for c in ax . collections : if exp . name in c . get_label ( ) : c . remove ( ) plot_exp_on_fig ( exp , fig_resolution ) update_legend ( visible_experiments , fig_resolution ) update_pr_legend ( visible_experiments , axes [ 6 ] ) update_auc_legend ( visible_experiments , axes [ 4 ] ) return update_color
Function that creates the callback to update curve color.
Function that creates the callback to update curve color .
"""
    Function that creates the callback to update curve color.
    Args
        experiments_dict: the dictionary of loaded experiments
        fig_resolution: the figure containing the plots
        visible_experiments: the set of plotted experiments
    """ """
        Function to be called when a `ipywidgets.Button` is clicked

        Args
            sender: the object received by `ipywidgets.Button().on_click()`
        """
experiments_dict
fig_resolution
visible_experiments