Skip to content

Instantly share code, notes, and snippets.

@osnr
Created February 21, 2013 19:11
Show Gist options
  • Save osnr/5007244 to your computer and use it in GitHub Desktop.
Save osnr/5007244 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import csv
import matplotlib.pyplot as plt
from matplotlib import dates
from datetime import datetime
X = []
Y = []
with open('tabcounts.csv', 'rb') as csvfile:
for row in csv.reader(csvfile):
X.append(dates.date2num(datetime.fromtimestamp(float(row[0]) / 1000)))
Y.append(int(row[1]))
plt.plot_date(X, Y, 'b-')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment