//  [python]
def create_dint_ratios_grouped_bar_plot(pos_dintr_dic, neg_dintr_dic, out_plot,
                                        disable_title=False,
                                        theme=1):
    """
    Create a grouped bar plot, showing the di-nucleotide ratios (16 classes)
    in the positive and negative set.
    Input ratio dictionaries for positives and negatives, with key being
    di-nucleotide and value the ratio.
    Create a dataframe using Pandas, and use seaborn for plotting.
    Store plot in out_plot.

    MV colors:
    #69e9f6, #f154b2

    """

    # Checker.
    assert pos_dintr_dic, "given dictionary pos_dintr_dic empty"
    assert neg_dintr_dic, "given dictionary neg_dintr_dic empty"
    # Make pandas dataframe.
    pos_label = "Positives"
    neg_label = "Negatives"
    data = {'set': [], 'dint': [], 'perc': []}
    for dint in pos_dintr_dic:
        data['set'].append(pos_label)
        data['dint'].append(dint)
        data['perc'].append(pos_dintr_dic[dint])
    for dint in neg_dintr_dic:
        data['set'].append(neg_label)
        data['dint'].append(dint)
        data['perc'].append(neg_dintr_dic[dint])
    df = pd.DataFrame (data, columns = ['set','dint', 'perc'])

    if theme == 1:
        # Make plot.
        sns.set(style="darkgrid")
        g = sns.catplot(x="dint", y="perc", hue="set", data=df, height=6,
                        kind="bar", palette=["#69e9f6", "#f154b2"],
                        edgecolor="lightgrey",
                        legend=False)
        g.fig.set_figwidth(16)
        g.fig.set_figheight(4)
        # Modify axes.
        ax = g.axes
        ax[0,0].set_ylabel("Percentage (%)",fontsize=20)
        ax[0,0].set(xlabel=None)
        ax[0,0].tick_params(axis='x', labelsize=20)
        ax[0,0].tick_params(axis='y', labelsize=16)
        if not disable_title:
            ax[0,0].axes.set_title("Di-nucleotide distribution", fontsize=22)
        # Add legend at specific position.
        plt.legend(loc=(1.01, 0.4), fontsize=16)
        g.savefig(out_plot, dpi=100, bbox_inches='tight')

    elif theme == 2:
        text_color = "#fcc826"
        plot_color = "#fd3b9d"
        box_color = "#2f19f3"
        # Make plot.
        sns.set(style="darkgrid", rc={ "axes.labelcolor": text_color, "text.color": text_color, "xtick.color": text_color, "ytick.color": text_color, "grid.color": plot_color, "axes.edgecolor": plot_color})

        g = sns.catplot(x="dint", y="perc", hue="set", data=df, height=6,
                        kind="bar", palette=["blue", "darkblue"],
                        edgecolor="#fcc826",
                        legend=False)
        g.fig.set_figwidth(16)
        g.fig.set_figheight(4)
        # Modify axes.
        ax = g.axes
        ax[0,0].set_ylabel("Percentage (%)",fontsize=20)
        ax[0,0].set(xlabel=None)
        ax[0,0].tick_params(axis='x', labelsize=20)
        ax[0,0].tick_params(axis='y', labelsize=16)
        if not disable_title:
            ax[0,0].axes.set_title("Di-nucleotide distribution", fontsize=22)
        # Add legend at specific position.
        plt.legend(loc=(1.01, 0.4), fontsize=16, framealpha=0)
        g.savefig(out_plot, dpi=100, bbox_inches='tight', transparent=True)