Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
numpy.genfromtxt(path, delimiter=',', names=True, dtype=None)
fig = plt.figure(1)
plt.xlabel('Month')
plt.ylabel('Cost of Food')
plt.title('Cost of Food from May 2013 to May 2014)
# month is a tuple I created for this data, month[0] is number of month, month[1] is numpy array
plt.plot_date([month[0] for month in data], [month[1][0][plan] for month in data], '-b', label=month[1][0][1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment