plot.py 289 Bytes
import matplotlib.pyplot as plt
import matplotlib.dates as mdates

def plot_data(filename, x, y):
    plt.clf()
    plt.plot(x, y)
    plt.gcf().autofmt_xdate()
    day_locator = mdates.DayLocator(interval=30*3)
    plt.gca().xaxis.set_major_locator(day_locator)
    plt.savefig(filename)