pyplot doesn't listen to any of my styling commands and also doesn't show any axes ticks.
I copied this example from https://www.tutorialspoint.com/matplotlib/matplotlib_bar_plot.htmand couldn't get it to work as theirs did, nor when I added my data
team_data = {
"England": {
"avg_game_difference": 5.0476190476190474,
"articles_count": 51
},
"France": {
"avg_game_difference": 3.857142857142857,
"articles_count": 12
},
"Ireland": {
"avg_game_difference": 5.2,
"articles_count": 22
},
"Italy": {
"avg_game_difference": 7.0,
"articles_count": 5
},
"Scotland": {
"avg_game_difference": 2.5,
"articles_count": 9
},
"Wales": {
"avg_game_difference": 3.5833333333333335,
"articles_count": 24
},
"New Zealand": {
"avg_game_difference": 1.25,
"articles_count": 9
}
}
fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])
categories = list(team_data.keys())
data = [i['articles_count'] for i in team_data.values()]
ax.bar(categories, data)
ax.set_title('Teams with most articles written')
ax.set_xlabel('Teams')
ax.set_ylabel('Number articles written')
plt.savefig('output.png')
see output.png