Question: import matplotlib.pyplot as plt def autolabel(rectangle_group): for rect in rectangle_group: height = rect.get_height() ax.annotate(str(height), xy = (rect.get_x() + rect.get_width() / 2,height), ha = 'center', xytext

import matplotlib.pyplot as plt

def autolabel(rectangle_group): for rect in rectangle_group: height = rect.get_height()

ax.annotate(str(height), xy = (rect.get_x() + rect.get_width() / 2,height), ha = 'center', xytext = (0,3),textcoords = 'offset points', color = 'grey')

phases = ['Mid 90s','Early 2k','Mid 2k','Mid 2010s'] playstation = [102 , 155 , 87 , 110 ] pc_sales = [71 , 128 , 240 , 316 ]

width = 0.2 x_playstation = [x - width for x in range(len(playstation))] x_xbox = [x for x in range(len(xbox))] x_nintendo = [x + width for x in range(len(nintendo))]

fig,ax = plt.subplots()

rect1 = ax.bar(x_playstation, playstation,width, label = 'Playstation',color = 'darkslategray') ax.plot(phases,pc_sales,label = 'PC Sales',color = 'black',marker = 'o')

ax.set_title('The hardware market') ax.set_ylabel('Total sales (in millions)') ax.legend()

autolabel(rect1)

plt.show()

How to make the font bigger in the name of categories on the x-axis?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!