def create_long_term_charts(players_buckets, battles_buckets, average_battles_per_day_buckets, watermark_text='@WOTC_Tracker'):
    dates = [(datetime.strptime(d, '%Y-%m-%d') - timedelta(days=1)) for d in players_buckets['all'].keys()]
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Active Accounts Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, players_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, players_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(PLAYERSLONG_PNG)
    del fig
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Total Battles Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, battles_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, battles_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(BATTLESLONG_PNG)
    del fig
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Average Battles Played Per Account Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, average_battles_per_day_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, average_battles_per_day_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(AVERAGELONG_PNG)
    del fig
def create_long_term_charts(players_buckets, battles_buckets, average_battles_per_day_buckets, watermark_text='@WOTC_Tracker'):
    dates = [(datetime.strptime(d, '%Y-%m-%d') - timedelta(days=1)) for d in players_buckets['all'].keys()]
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Active Accounts Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, players_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, players_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(PLAYERSLONG_PNG)
    del fig
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Total Battles Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, battles_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, battles_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(BATTLESLONG_PNG)
    del fig
    plt.clf()
    fig = plt.figure(figsize=(24, 8), dpi=150)
    fig.suptitle('Average Battles Played Per Account Per Platform (long view)')
    ax1 = fig.add_subplot(111)
    ax1.ticklabel_format(useOffset=False, style='plain')
    ax1.plot(dates, average_battles_per_day_buckets['xbox'].values(), color='green', linewidth=2, label='Xbox')
    ax1.plot(dates, average_battles_per_day_buckets['ps'].values(), color='blue', linewidth=2, label='Playstation')
    ax1.set_xticks(dates)
    ax1.grid()
    ax1.legend()
    ax1.text(0.5, (- 0.15), watermark_text, horizontalalignment='center', verticalalignment='center', transform=ax1.transAxes)
    ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
    fig.tight_layout()
    fig.autofmt_xdate()
    fig.savefig(AVERAGELONG_PNG)
    del fig