Line Chart - Total Number of websites online


In [4]:
import matplotlib.pyplot as plt
from collections import Counter

create a line chart to visualize the number of websites on the world wide web (data source: Internet Live Stats)


In [ ]:
def line_graph(plt):
    years = [2000, 2002, 2005, 2007, 2010, 2012, 2014, 2015]
    websites = [17, 38, 64, 121, 206, 697, 968, 863]

add a line chart, with the number of websites on y-axis and the years on x-axis


In [ ]:
plt.plot(years, websites, color='blue', marker='o',
             linestyle='solid', linewidth= 2,)

adjust the x and y axis range


In [ ]:
plt.xlim(2000, 2015)
    plt.ylim(10, 1000)

In [ ]:
plt.title("Total number of websites online")

In [ ]:
plt.ylabel("Websites (millions)")

In [ ]:
plt.show()

In [3]:
if __name__ == "__main__":

    line_graph(plt)