
# When creating bar charts it is considered especially bad form 
# for your y-axis not to start at 0, since this is an easy way to mislead people

# Anyway, here's how to make a chart with non-Zero y-origin

# Data: just 2 

mentions = [500, 505]
years = [2013, 2014]


from matplotlib import pyplot as plt


# Plot the bars
plt.bar(years, mentions, 0.8)		# 0.8 is the width

# Display the tick values on the x-axis
plt.xticks(years)
plt.ylabel("# of times I heard someone say 'data science'")

# if you don't do this, matplotlib will label the x-axis 0, 1
# and then add a +2.013e3 off in the corner (bad matplotlib!)
# plt.ticklabel_format(useOffset=False)


# **** only shows the part above 500 ****
# plt.axis([2012, 2014, 499,506])           # Won't show the whole bar...
plt.axis([2012.5, 2014.5, 499, 506])

plt.title("Look at the 'Huge' Increase!")

plt.show()


