def create_mode_difference_graph(dates, ww2_battles_xbox, ww2_battles_ps, cw_battles_xbox, cw_battles_ps, percent_cw_xbox, percent_cw_ps, long_term=False, watermark_text='@WOTC_Tracker'):
    shifted_dates = [(datetime.strptime(d, '%Y-%m-%d') - timedelta(days=1)).strftime('%Y-%m-%d') for d in dates]
    plt.clf()
    fig = (plt.figure(figsize=(11, 8), dpi=150) if (not long_term) else plt.figure(figsize=(24, 8), dpi=150))
    fig.suptitle(('Estimated breakdown of battles between CW and WW2, per platform' if (not long_term) else 'Estimated breakdown of battles between CW and WW2, per platform (long term)'))
    ax1 = fig.add_subplot(111)
    ax1.tick_params(axis='x', labelrotation=45)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.set_xticklabels(shifted_dates, ha='right')
    ax1.plot(shifted_dates, ww2_battles_xbox, color='darkgreen', linewidth=2, label='WW2: Xbox')
    ax1.plot(shifted_dates, cw_battles_xbox, color='lightgreen', linewidth=2, label='CW: Xbox')
    ax1.plot(shifted_dates, ww2_battles_ps, color='darkblue', linewidth=2, label='WW2: Playstation')
    ax1.plot(shifted_dates, cw_battles_ps, color='lightblue', linewidth=2, label='CW: Playstation')
    ax1.set_ylim(bottom=0)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, 1.05, watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    fig.savefig((MODEBREAKDOWN_PNG if (not long_term) else MODEBREAKDOWNLONG_PNG))
    del fig
    plt.clf()
    fig = (plt.figure(figsize=(11, 8), dpi=150) if (not long_term) else plt.figure(figsize=(24, 8), dpi=150))
    fig.suptitle(('Estimated percentage of battles taking place in CW, per platform' if (not long_term) else 'Estimated percentage of battles taking place in CW, per platform (long term)'))
    ax1 = fig.add_subplot(111)
    ax1.yaxis.set_major_formatter(mtick.PercentFormatter(1.0))
    ax1.tick_params(axis='x', labelrotation=45)
    ax1.set_xticklabels(shifted_dates, ha='right')
    ax1.plot(shifted_dates, percent_cw_xbox, color='green', linewidth=2, label='Xbox')
    ax1.plot(shifted_dates, percent_cw_ps, color='blue', linewidth=2, label='Playstation')
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, 1.05, watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    fig.savefig((MODEBREAKDOWNPERCENT_PNG if (not long_term) else MODEBREAKDOWNPERCENTLONG_PNG))
    del fig
def create_mode_difference_graph(dates, ww2_battles_xbox, ww2_battles_ps, cw_battles_xbox, cw_battles_ps, percent_cw_xbox, percent_cw_ps, long_term=False, watermark_text='@WOTC_Tracker'):
    shifted_dates = [(datetime.strptime(d, '%Y-%m-%d') - timedelta(days=1)).strftime('%Y-%m-%d') for d in dates]
    plt.clf()
    fig = (plt.figure(figsize=(11, 8), dpi=150) if (not long_term) else plt.figure(figsize=(24, 8), dpi=150))
    fig.suptitle(('Estimated breakdown of battles between CW and WW2, per platform' if (not long_term) else 'Estimated breakdown of battles between CW and WW2, per platform (long term)'))
    ax1 = fig.add_subplot(111)
    ax1.tick_params(axis='x', labelrotation=45)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.set_xticklabels(shifted_dates, ha='right')
    ax1.plot(shifted_dates, ww2_battles_xbox, color='darkgreen', linewidth=2, label='WW2: Xbox')
    ax1.plot(shifted_dates, cw_battles_xbox, color='lightgreen', linewidth=2, label='CW: Xbox')
    ax1.plot(shifted_dates, ww2_battles_ps, color='darkblue', linewidth=2, label='WW2: Playstation')
    ax1.plot(shifted_dates, cw_battles_ps, color='lightblue', linewidth=2, label='CW: Playstation')
    ax1.set_ylim(bottom=0)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, 1.05, watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    fig.savefig((MODEBREAKDOWN_PNG if (not long_term) else MODEBREAKDOWNLONG_PNG))
    del fig
    plt.clf()
    fig = (plt.figure(figsize=(11, 8), dpi=150) if (not long_term) else plt.figure(figsize=(24, 8), dpi=150))
    fig.suptitle(('Estimated percentage of battles taking place in CW, per platform' if (not long_term) else 'Estimated percentage of battles taking place in CW, per platform (long term)'))
    ax1 = fig.add_subplot(111)
    ax1.yaxis.set_major_formatter(mtick.PercentFormatter(1.0))
    ax1.tick_params(axis='x', labelrotation=45)
    ax1.set_xticklabels(shifted_dates, ha='right')
    ax1.plot(shifted_dates, percent_cw_xbox, color='green', linewidth=2, label='Xbox')
    ax1.plot(shifted_dates, percent_cw_ps, color='blue', linewidth=2, label='Playstation')
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, 1.05, watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    fig.savefig((MODEBREAKDOWNPERCENT_PNG if (not long_term) else MODEBREAKDOWNPERCENTLONG_PNG))
    del fig