Learn practical skills, build real-world projects, and advance your career
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
years = range(2000, 2012)
apples = [0.895, 0.91, 0.919, 0.926, 0.929, 0.931, 0.934, 0.936, 0.937, 0.9375, 0.9372, 0.939]
oranges = [0.962, 0.941, 0.930, 0.923, 0.918, 0.908, 0.907, 0.904, 0.901, 0.898, 0.9, 0.896, ]
plt.plot(years, apples,marker='s',ls='-',lw='2',ms='5',mew=3, mec='navy')
plt.plot(years, oranges,marker='o',ls='--',lw='1',ms='8', alpha=.5)

plt.xlabel('Year')
plt.ylabel('Yield (tons per hectare)')

plt.title("Crop Yields in Kanto")
plt.legend(['Apples', 'Oranges']);
Notebook Image
plt.plot(years, apples, 's-b')
plt.plot(years, oranges, 'o--r')

plt.xlabel('Year')
plt.ylabel('Yield (tons per hectare)')

plt.title("Crop Yields in Kanto")
plt.legend(['Apples', 'Oranges']);
Notebook Image
plt.plot(years, oranges, 'or')
plt.title("Yield of Oranges (tons per hectare)");
Notebook Image