Libraries - BrunaHeleno/Python GitHub Wiki

Matplotlib

  • Low level graph plotting
month_sales = [1500, 1727, 1350, 999, 1050, 1027, 1022, 1500, 2000, 2362, 2100, 2762]
months = ['jan', 'feb', 'mar', 'april', 'may', 'june', 'july', 'aug', 'sep', 'oct', 'nov', 'dec']

import matplotlib.pyplot as plt #as plt makes simple to use as variable

plt.plot(months, month_sales)
plt.ylabel('Sales')
plt.xlabel('Months')
plt.axis([0, 12, 0, max(month_sales)+500)
plt.show()