plot.py 289 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 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)