Skip to content

Instantly share code, notes, and snippets.

Created September 27, 2014 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5effe3a4ccb92141718d to your computer and use it in GitHub Desktop.
Save anonymous/5effe3a4ccb92141718d to your computer and use it in GitHub Desktop.
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