Limes Sales Graph using Matplotlip

from matplotlib import pyplot as plt

months = ["Jan""Feb""Mar""Apr""May""Jun""Jul""Aug""Sep""Oct""Nov""Dec"]

visits_per_month = [969579091083112942124951679414161127621277712439103098724]

# numbers of limes of different species sold each month
key_limes_per_month = [92.0109.0124.070.0101.079.0106.0101.0103.090.0102.0106.0]
persian_limes_per_month = [67.051.057.054.083.090.052.063.051.044.064.078.0]
blood_limes_per_month = [75.075.076.071.074.077.069.080.063.069.073.082.0]


# create your figure here
plt.figure(figsize=(12,8))
ax1 = plt.subplot(1,2,1)
x_value = range(len(months))
plt.plot(x_value,visits_per_month,marker = 's')
plt.xlabel('month')
plt.ylabel('visitors')
ax1.set_xticks(x_value)
ax1.set_xticklabels(months)
plt.title('Number of Visitors Per Month')

ax2 = plt.subplot(1,2,2)
plt.plot(x_value,key_limes_per_month,color = 'pink')
plt.plot(x_value,persian_limes_per_month,color = 'green')
plt.plot(x_value,blood_limes_per_month,color = 'red')
plt.legend(['Key Limes','Persian Limes','Blood Limes'])
ax2.set_xticks(x_value)
ax2.set_xticklabels(months)
plt.title('Sales Per Product')


plt.show()
plt.savefig('Lime Sales Graph')



games = ["LoL""Dota 2""CS:GO""DayZ""HOS""Isaac""Shows""Hearth""WoT""Agar.io"]

viewers =  [1070472302239210171170908671]
plt.bar(range(len(games)),viewers,color='pink')
plt.title('Viewers Per Game')
plt.xlabel('Game')
plt.ylabel('No of Viewers')
ax = plt.subplot()
ax.set_xticks([0,1,2,3,4,5,6,7,8,9,10])
ax.set_xticklabels(gamesrotation=30)
plt.show()

# Pie Chart: League of Legends Viewers' Whereabouts


labels = ["US""DE""CA""N/A""GB""TR""BR""DK""PL""BE""NL""Others"]

countries = [44766644945282520191717279]

# Line Graph: Time Series Analysis

hour = range(24)

viewers_hour = [301734291914324954862584051695576811021207163]



Comments

Popular posts from this blog

Binomial Test in Python

Slicing and Indexing in Python Pandas

Python Syntax and Functions Part2 (Summary Statistics)