causalml/metrics/visualize.py [664:704]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        df,
        learner=learner,
        inference_col=inference_col,
        outcome_col=outcome_col,
        treatment_col=treatment_col,
        p_col=p_col,
        n_segment=n_segment,
        cv=cv,
        calibrate_propensity=calibrate_propensity,
        ci=ci,
    )
    if ci:
        model_names = [x.replace(" LB", "") for x in plot_df.columns]
        model_names = list(set([x.replace(" UB", "") for x in model_names]))

        fig, ax = plt.subplots(figsize=figsize)
        cmap = plt.get_cmap("tab10")
        cindex = 0

        for col in model_names:
            lb_col = col + " LB"
            up_col = col + " UB"

            if col != "Random":
                ax.plot(plot_df.index, plot_df[col], color=cmap(cindex))
                ax.fill_between(
                    plot_df.index,
                    plot_df[lb_col],
                    plot_df[up_col],
                    color=cmap(cindex),
                    alpha=0.25,
                )
            else:
                ax.plot(plot_df.index, plot_df[col], color=cmap(cindex))
            cindex += 1

        ax.legend()
    else:
        plot_df.plot(figsize=figsize)

    plt.xlabel("Population")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



causalml/metrics/visualize.py [737:777]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        df,
        learner=learner,
        inference_col=inference_col,
        outcome_col=outcome_col,
        treatment_col=treatment_col,
        p_col=p_col,
        n_segment=n_segment,
        cv=cv,
        calibrate_propensity=calibrate_propensity,
        ci=ci,
    )
    if ci:
        model_names = [x.replace(" LB", "") for x in plot_df.columns]
        model_names = list(set([x.replace(" UB", "") for x in model_names]))

        fig, ax = plt.subplots(figsize=figsize)
        cmap = plt.get_cmap("tab10")
        cindex = 0

        for col in model_names:
            lb_col = col + " LB"
            up_col = col + " UB"

            if col != "Random":
                ax.plot(plot_df.index, plot_df[col], color=cmap(cindex))
                ax.fill_between(
                    plot_df.index,
                    plot_df[lb_col],
                    plot_df[up_col],
                    color=cmap(cindex),
                    alpha=0.25,
                )
            else:
                ax.plot(plot_df.index, plot_df[col], color=cmap(cindex))
            cindex += 1

        ax.legend()
    else:
        plot_df.plot(figsize=figsize)

    plt.xlabel("Population")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



