//  [python]
def gen_paper_plots(df_pred_uci):
    cm = 1/2.54  # centimeters in inches
    sns.set()
    sns.set_style("white")
    sns.set_style("ticks")
    sns.despine()
    sns.set_context("paper")
    sns.color_palette("tab10")

    print ("Generating point plots") 
    print (df_pred_uci.head())
    dataset_names = df_pred_uci["Dataset"].unique()
    new_dataset_names = [label.replace('-', '-\n') for label in dataset_names]


    #================================================
    print (f"Generating Interval Score")
    df_pred_uci["lower"] = df_pred_uci["Mu"] - 2*df_pred_uci["Sigma"]
    df_pred_uci["lower"].mask(df_pred_uci["Method"]=="Laplace", df_pred_uci["Mu"] - 3*df_pred_uci["Sigma"], inplace=True)
    df_pred_uci["upper"] = df_pred_uci["Mu"] + 2*df_pred_uci["Sigma"]
    df_pred_uci["upper"].mask(df_pred_uci["Method"]=="Laplace", df_pred_uci["Mu"] + 3*df_pred_uci["Sigma"], inplace=True)
    
    df_pred_uci["Interval Score"] = df_pred_uci["upper"] - df_pred_uci["lower"] \
     + (2/0.95)*(df_pred_uci["lower"]-df_pred_uci["Target"])*(df_pred_uci["Target"]<df_pred_uci["lower"]) \
     + (2/0.95)*(df_pred_uci["Target"] - df_pred_uci["upper"])*(df_pred_uci["Target"]>df_pred_uci["upper"])
    
    fig = plt.figure(figsize=(14.2*cm, 14.2*cm/2.0))
    gs = fig.add_gridspec(1, 9)
    for i,dataset_name in enumerate(dataset_names):
        ax = fig.add_subplot(gs[0,i])
         
        g = sns.pointplot(x="Method", y="Interval Score", hue="Method", 
                          markers=["o", "x", "*", "D"],
                          linestyles=["-","--","-.",":"],
                           data=df_pred_uci[df_pred_uci.Dataset == dataset_name], legend=False)
        #g.set(yscale="log")
        g.get_legend().remove()
        g.set_xlabel(new_dataset_names[i], fontsize='xx-small')
        g.axes.get_xaxis().set_ticks([])
        g.axes.get_yaxis().set_ticks([])
        if i != 0:
            g.axes.get_yaxis().get_label().set_visible(False)
            g.axes.get_yaxis().set_ticks([])
    handles, labels = g.get_legend_handles_labels()
    fig.legend(handles, labels, bbox_to_anchor=(0.55, 0.92), loc='lower center', ncol=5, fancybox=True, shadow=True)
    plt.savefig(os.path.join(output_dir, f"Interval_score_point_uci.pdf"), bbox_inches='tight')
    plt.show()
    plt.clf()

    #RMSE
    df_pred_uci["RMSE"] = (df_pred_uci["Mu"] - df_pred_uci["Target"])**2
    
    fig = plt.figure(figsize=(14.2*cm, 14.2*cm/2.0))
    gs = fig.add_gridspec(1, 9)
    for i,dataset_name in enumerate(dataset_names):
        ax = fig.add_subplot(gs[0,i])
         
        g = sns.pointplot(x="Method", y="RMSE", hue="Method", 
                          markers=["o", "x", "*", "D"],
                          linestyles=["-","--","-.",":"],
                           data=df_pred_uci[df_pred_uci.Dataset == dataset_name], legend=False)
        g.get_legend().remove()
        g.set_xlabel(new_dataset_names[i], fontsize='xx-small')
        g.axes.get_xaxis().set_ticks([])
        g.axes.get_yaxis().set_ticks([])
        if i != 0:
            g.axes.get_yaxis().get_label().set_visible(False)
        
    handles, labels = g.get_legend_handles_labels()
    fig.legend(handles, labels, bbox_to_anchor=(0.55, 0.92), loc='lower center', ncol=5, fancybox=True, shadow=True)
    plt.savefig(os.path.join(output_dir, "RMSE_point_uci.pdf"), bbox_inches='tight')
    plt.show()