Learn practical skills, build real-world projects, and advance your career
# https://www.youtube.com/watch?v=bybjFBOBJlg
# https://jovian.ai/aakashns/python-matplotlib-data-visualization

import matplotlib.pyplot as plt
import seaborn as sns # helps you by avoiding to write a lot of code
%matplotlib inline # how you want your graphs to display
yield_apples = [0.895, 0.91, 0.919, 0.926, 0.929, 0.931]
plt.plot(yield_apples); # use ; to avoid '[<matplotlib.lines.Line2D at 0x20e49cee160>]' shown within the output
# Customise the x-axis
years = [2010, 2011, 2012, 2013, 2014, 2015]
yield_apples = [0.895, 0.91, 0.919, 0.926, 0.929, 0.931]
# Axis labels
plt.plot(years, yield_apples)
plt.xlabel('Year')
plt.ylabel('Yield (tons per hectare)');
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, ]